changeset 328:081793c751c5

make sure the grouping code skips as many groups as is necessary to come to the group that the next message belongs to
author Myk Melez <myk@mozilla.org>
date Thu, 16 Oct 2008 16:38:10 -0700
parents 3a8dfaf1ac31
children e217720a7da8
files content/river.js content/stream.js
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/content/river.js	Thu Oct 16 16:37:38 2008 -0700
+++ b/content/river.js	Thu Oct 16 16:38:10 2008 -0700
@@ -653,7 +653,7 @@
     for (let i = 0; i < this._collection.messages.length; ++i) {
       let message = this._collection.messages[i];
 
-      if (message.received < groups[groupIndex].epoch) {
+      while (message.received < groups[groupIndex].epoch) {
         ++groupIndex;
 
         let header = this._document.createElementNS(XUL_NS, "checkbox");
--- a/content/stream.js	Thu Oct 16 16:37:38 2008 -0700
+++ b/content/stream.js	Thu Oct 16 16:38:10 2008 -0700
@@ -345,7 +345,7 @@
     for (let i = 0; i < this._collection.messages.length; ++i) {
       let message = this._collection.messages[i];
 
-      if (message.received < groups[groupIndex].epoch) {
+      while (message.received < groups[groupIndex].epoch) {
         ++groupIndex;
 
         let header = this._document.createElementNS(XUL_NS, "checkbox");