multi-message selection: mark as read timer not cleared

RESOLVED FIXED

Status

RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: bugzilla, Assigned: bugzilla)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 years ago
The issue that was fixed for Thunderbird in bug 233027 should also be fixed in SeaMonkey.
(Assignee)

Comment 1

11 years ago
Created attachment 285728 [details] [diff] [review]
Port of the TB patch
Assignee: mail → aqualon
Status: NEW → ASSIGNED
Attachment #285728 - Flags: superreview?(neil)
Attachment #285728 - Flags: review?(mnyromyr)
(Assignee)

Comment 2

11 years ago
Created attachment 285736 [details] [diff] [review]
Port including all files

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)

Updated

11 years ago
Attachment #285736 - Flags: superreview?(neil) → superreview+

Comment 3

11 years ago
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+

Updated

11 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
No longer blocks: 360488
You need to log in before you can comment on or make changes to this bug.