Closed Bug 1051750 Opened 10 years ago Closed 10 years ago

[Calendar] Busy indicator are shown when offline calendar is disabled.

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1057023

People

(Reporter: swathiks115, Unassigned)

References

Details

No description provided.
Disabling offline calendar will disable event indicator only in active month. In previous/ next month Indicators are still shown.
Flags: needinfo?(kgrandon)
Steps to reproduce. 1. Open calendar, add events in offline calendar(ex. in August month) 2. move to next month(i.e September) 3. Disable offline calendar. 4. move back to previous month(i.e August) 5. Busy indicator is still shown. Please check this issue. Thanks!
this should be fixed by Bug 1023662 (I improved the whole disable/enable calendars logic on current patch).
Depends on: 1023662
Flags: needinfo?(kgrandon)
I tried with your patch. This issue is still there in month view. In month view, after disabling Offline calendar, then move to other month. Busy indicator in new month is still shown
Flags: needinfo?(mmedeiros)
I'm sure it fixes the problem, I grab all the "busytimes" (events) from existing views and dispatch add/remove events (https://github.com/mozilla-b2g/gaia/blob/36f5b8433d2897259409d237c4a33e2032718be1/apps/calendar/js/controllers/time.js#L493-L504) so that should remove the dots and events from all views. - when building a new view it also filters the busytimes from hidden calendars.
Flags: needinfo?(mmedeiros)
marking as a duplicate of Bug 1057023 since we have more info over there.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Hi, Can you please tell me how dots and events are removed when calendar is disabled? Thanks.
Flags: needinfo?(mmedeiros)
swathiks, this is basically what happens: 1. each view listens the TimeController for a specific timespan (day/month/week). 2. we dispatch an "calendarVisibilityChange" event on CalendarStore#persist every time calendar is disabled/enabled. 3. The TimeController listens to the this event and dispatches an "add" or "remove" event for each busytime that is currently cached (we cache the busytimes for a few months to improve performance while changing between months). 4. view updates based on add/remove events. the only difference is that now we we are migrating to a new structure (like the 5-day week view), where we introduced the DayObserver (listen/gets all events for a single day) and we re-render the whole day events every time something changes. it still uses the TimeController under the hood, but our plan is to migrate to a simpler structure in the future.
Flags: needinfo?(mmedeiros)
Thanks Miller for the information.
You need to log in before you can comment on or make changes to this bug.