From: Michael J. Rubinsky Date: Thu, 2 Dec 2010 06:02:35 +0000 (-0500) Subject: only mark calendars as retrieved if _all_ the dates are cached X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cf3de8af853646227467ec8e41d6ad79c54315a1;p=horde.git only mark calendars as retrieved if _all_ the dates are cached --- diff --git a/kronolith/js/mobile.js b/kronolith/js/mobile.js index d38c07884..198a2de3e 100644 --- a/kronolith/js/mobile.js +++ b/kronolith/js/mobile.js @@ -62,7 +62,6 @@ cals = cals[cal[1]]; c = cals[startDay.dateString()]; while (typeof c != 'undefined' && startDay.isBefore(endDay)) { - KronolithMobile.loadedCalendars.push(cal.join('|')); if (view != 'month') { KronolithMobile.insertEvents([startDay, startDay], view, cal.join('|')); } @@ -72,7 +71,6 @@ c = cals[endDay.dateString()]; while (typeof c != 'undefined' && !startDay.isAfter(endDay)) { - KronolithMobile.loadedCalendars.push(cal); if (view != 'month') { KronolithMobile.insertEvents([endDay, endDay], view, cal.join('|')); } @@ -80,6 +78,7 @@ c = cals[endDay.dateString()]; } if (startDay.compareTo(endDay) > 0) { + KronolithMobile.loadedCalendars.push(cal.join('|')); return; } }