Closed
Bug 329775
Opened 19 years ago
Closed 18 years ago
Agenda tree doesn't update when program stays open over night
Categories
(Calendar :: Lightning Only, defect)
Calendar
Lightning Only
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jminta, Assigned: jminta)
References
Details
Attachments
(1 file, 1 obsolete file)
6.09 KB,
patch
|
jminta
:
first-review+
|
Details | Diff | Splinter Review |
I woke up this morning and realized that the events listed in the agenda tree's "Today" were still the ones applicable to yesterday. Lightning should copy Sunbird's timer that re-draws these type of widgets at midnight.
Assignee | ||
Comment 1•19 years ago
|
||
*** Bug 331596 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 2•19 years ago
|
||
Taking bug. I have a patch, just waiting until tomorrow morning to make sure it really works.
Assignee: nobody → jminta
Assignee | ||
Comment 3•19 years ago
|
||
Patch sets up a continuous set of timeouts to refresh the agenda tree's periods at midnight. Works much like sunbird's unifinder/minimonth refresher.
Attachment #216943 -
Flags: first-review?(dmose)
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Comment 4•19 years ago
|
||
*** Bug 338104 has been marked as a duplicate of this bug. ***
Comment 5•19 years ago
|
||
Comment on attachment 216943 [details] [diff] [review]
timeouts and refreshPeriodDates
dmose, any chance on you reviewing this anytime soon?
Comment 6•19 years ago
|
||
(In reply to comment #3)
> Created an attachment (id=216943)
Drive-by comment:
Are two of these necessary? If so, can we add a comment explaining why?
+ // Add an unload function to the window so we don't leak the pref observer
+ document.getElementById("messengerWindow")
+ .addEventListener("unload", ltnFinish, false);
// Add an unload function to the window so we don't leak the pref observer
document.getElementById("messengerWindow")
.addEventListener("unload", ltnFinish, false);
Assignee | ||
Comment 7•19 years ago
|
||
(In reply to comment #6)
> (In reply to comment #3)
> > Created an attachment (id=216943) [edit]
>
> Drive-by comment:
>
> Are two of these necessary? If so, can we add a comment explaining why?
No, they're not, looks like a glitch in the patch. Everything else ought to be fine, though, so I'm reluctant to re-spin until i get dmose's review comments.
Comment 8•19 years ago
|
||
Sorry for the delay; I'll try and get to this tonight or tomorrow.
Comment 9•19 years ago
|
||
Comment on attachment 216943 [details] [diff] [review]
timeouts and refreshPeriodDates
>+ // Is an nsITimer/callback extreme overkill here? Yes, but it's necessary to
>+ // workaround bug 291386. If we don't, we stand a decent chance of getting
>+ // stuck in an infinite loop.
Can you tweak this comment to include the information you gave me in IRC re the other bug and that the reason this is a good workaround is because setTimeout is even more susceptible to the problem than nsITimer.
>+ var udCallback = {
>+ notify: function(timer) {
Please make this function non-anonymous for stacktrace readability.
>+ // Add an unload function to the window so we don't leak the pref observer
>+ document.getElementById("messengerWindow")
>+ .addEventListener("unload", ltnFinish, false);
No need for the duplicate call here.
>+function updateTodayWidgets() {
>+ agendaTreeView.refreshPeriodDates();
>+ document.getElementById("ltnMinimonth").refreshDisplay();
>+
>+ // refresh the current view, if it has ever been shown
Can you include in the comment why this is necessary?
>+ // set up another timer
The remaining code in this function appears to have been copy-pasted. How about factoring this out into its own function? Given that Sunbird also does something like this, is there a reasonable shared place where that function could live instead being forked?
Attachment #216943 -
Flags: first-review?(dmose) → first-review-
Assignee | ||
Comment 10•19 years ago
|
||
Adding dependency so that we have a shared place for this code in both Sunbird and Lightning.
Depends on: 337941
Assignee | ||
Comment 11•18 years ago
|
||
*** Bug 344867 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 12•18 years ago
|
||
I love unifying code. Patch unites Sunbird's midnight-update mechanism with Lightning's non-existent one. Refactoring the Sunbird code gives them a big startup perf win (since they don't need to draw the unifinder/views twice). Lightning takes a very minor startup perf hit to schedule the timer, but it's necessary to fix this very visible bug.
Attachment #216943 -
Attachment is obsolete: true
Attachment #230660 -
Flags: first-review?(dmose)
Assignee | ||
Comment 13•18 years ago
|
||
Comment on attachment 230660 [details] [diff] [review]
unified midnight update service
+/* Creates a timer that will fire after midnight. Pass in a function as
+ * aRefreshCallback that should be called at that time.
+ */
doxygen style comments would be nice.
r=dmose
Attachment #230660 -
Flags: first-review?(dmose) → first-review+
Assignee | ||
Comment 14•18 years ago
|
||
patch checked in. woot.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 15•18 years ago
|
||
Verified with Thunderbird 1.5.0.5 (20060719) + Lightning/0.1+ (2006080207).
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 16•18 years ago
|
||
*** Bug 351355 has been marked as a duplicate of this bug. ***
Comment 17•18 years ago
|
||
I installed Lightning (build 2006090406) yesterday (Monday the 4th) and this morning (Tuesday the 5th) when I went into Thunderbird, the calendar was still sitting on Monday the 4th.
Is there something special that needs to be done to make this work?
Comment 18•18 years ago
|
||
Is there anything in the JavaScript console?
Comment 19•18 years ago
|
||
I have seen this in 0.3RC1 & RC2 on WindowsXP when using hibernate overnight
Comment 20•18 years ago
|
||
this is not working for me.
I use thunderbird 1.5.0.7 (20060909) and ligthning 0.3(2006100618)
I'm using a laptop and I hibernate it during the night. (so it's closed at midnight)
I don't close thunderbird every day.
After a few day, I still see "today" showing the same day (ie for example, sunday when it's really tuesday...).
look's like something is missing to handle this case.
Comment 21•18 years ago
|
||
*** Bug 357079 has been marked as a duplicate of this bug. ***
Comment 22•18 years ago
|
||
I have got the problem again this night!
Thunderbird 1.5.0.7 (20060909) + Lightning/0.3 (2006101608)
So, I don't think it's fixed...
Comment 23•18 years ago
|
||
I reopened Bug 357079 because this is a slightly different problem. This Bug is about update problem if Sunbird/Thunderbird runs overnight. Bug 357079 is about update problem after System resumes from Hibernate state but was not running overnight. Therefore a different solution than the timer callback is required.
Comment 24•18 years ago
|
||
I got the error this night. I had something to do yesterday, and it was still in the items today. I had to close/reopen thunderbird to fix the issue.
Thunderbird version 1.5.0.5 (20060904)
Lightning version 0.3.1 (2007021403)
Gentoo GNU/Linux machine.
Comment 26•17 years ago
|
||
I'm getting this same bug with Thunderbird 2.0.0.6 and Lightning 0.5 on Mac OS X.
You need to log in
before you can comment on or make changes to this bug.
Description
•