Closed Bug 400684 Opened 17 years ago Closed 17 years ago

multi-message selection: mark as read timer not cleared

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(1 file, 1 obsolete file)

The issue that was fixed for Thunderbird in bug 233027 should also be fixed in SeaMonkey.
Attached patch Port of the TB patch (obsolete) — Splinter Review
Assignee: mail → aqualon
Status: NEW → ASSIGNED
Attachment #285728 - Flags: superreview?(neil)
Attachment #285728 - Flags: review?(mnyromyr)
Forgot to include mailCommands.js in v1 of the patch.
Attachment #285728 - Attachment is obsolete: true
Attachment #285736 - Flags: superreview?(neil)
Attachment #285736 - Flags: review?(mnyromyr)
Attachment #285728 - Flags: superreview?(neil)
Attachment #285728 - Flags: review?(mnyromyr)
Attachment #285736 - Flags: superreview?(neil) → superreview+
Comment on attachment 285736 [details] [diff] [review]
Port including all files

I noticed that I was (unreproducibly :( ) able several times to select multiple messages while one message was still shown in the messagepane, in which case the firing timer still marked all selected messages as read. I don't think it's a problem with the marking code here, but rather a timing issue in the selection stuff...

That said, just some minor nits:

>Index: mailnews/base/resources/content/mailWindowOverlay.js
>===================================================================
>     if (gMarkViewedMessageAsReadTimer)
>     {
>       MarkCurrentMessageAsRead();
>-      ClearPendingReadTimer();
>     }
> 
>     SetNextMessageAfterDelete();
>     if (reallyDelete) {
>         gDBView.doCommand(nsMsgViewCommandType.deleteNoTrash);
>     }
>     else {
>         gDBView.doCommand(nsMsgViewCommandType.deleteMsg);

The braces are not needed anymore.

>       if (markReadOnADelay && wintype == "mail:3pane") // only use the timer if viewing using the 3-pane preview pane and the user has set the pref
>+      {
>+        ClearPendingReadTimer();
>         gMarkViewedMessageAsReadTimer = setTimeout(MarkCurrentMessageAsRead, gPrefBranch.getIntPref("mailnews.mark_message_read.delay.interval") * 1000);
>+      }
>       else
>         MarkCurrentMessageAsRead();

If an if branch is braced, the else branch should be, too.


r=me

Landed on trunk with braces corrected.
Attachment #285736 - Flags: review?(mnyromyr) → review+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
No longer blocks: TB2SM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: