Closed Bug 285009 Opened 20 years ago Closed 20 years ago

list of events (unifinder) doesn't show on load

Categories

(Calendar :: Sunbird Only, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mvl, Assigned: mostafah)

References

Details

Attachments

(1 file, 2 obsolete files)

The list of events on top of the screen (unifinder) doesn't show anything when
the window opens. It only shows events when the dropdown is changed (to all-day
or something).
Blocks: 281716
One liner fix to force the unifinder to refresh upon first load of Sunbird.

Comments appreciated: Is the fix really so simple?
Attachment #176719 - Flags: first-review?(pavlov)
While this might work, i'm not sure if it is the right thing.
In any case, an observer should be added to update the list on changes to the
calendar, like added or deleted events. And on loading the calendar.
But this patch might still be needed, i didn't check that yet.
The semantics of onLoad() for any observer seem to be broken/fuzzy. As i
understand it from mvl, onLoad() is mostly an old holdover back when everything
was in .ics files.

Hence I've decided to manually force a refresh the first time the unifinder is
loaded, and attach an observer for it to make it refresh when events are added
etc etc.

Comments appreciated.
Attachment #176719 - Attachment is obsolete: true
Attachment #176880 - Flags: first-review?(pavlov)
Attached patch Better and more complete fix — — Splinter Review
unifinderObserver should be declared as a var, not as a function and then
tacking on stuff onto its prototype.

Also I forgot to removeObserver() when the calendar is unloaded.

As mentioned earlier, onLoad() doesn't work properly for observers. So we
manually refresh upon first load.

addItems, modifyItems, are all caught by the unifinder now.
Attachment #176880 - Attachment is obsolete: true
Attachment #177005 - Flags: first-review?(pavlov)
Attachment #176719 - Flags: first-review?(pavlov)
Attachment #176880 - Flags: first-review?(pavlov)
Comment on attachment 177005 [details] [diff] [review]
Better and more complete fix

It dawned on me that we need additional calendar changed notifications so that
you can removeObserver on this calendar and addObserver on the new one.  I need
to think through that a little more... Probably add something to
calICalendarManager.  We also need that in the calendar window, so this is OK
for now.
Attachment #177005 - Flags: first-review?(pavlov) → first-review+
checked in the patch
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: