From cf3de8af853646227467ec8e41d6ad79c54315a1 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 2 Dec 2010 01:02:35 -0500 Subject: [PATCH] only mark calendars as retrieved if _all_ the dates are cached --- kronolith/js/mobile.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } } -- 2.11.0