messagepane content not cleared when opening saved search folder with no matches

RESOLVED FIXED

Status

RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: bugzilla, Assigned: bugzilla)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

12 years ago
Created attachment 273269 [details] [diff] [review]
Skip other scrolling attempts for virtual folders

This is the SeaMonkey equivalent to bug 364984 (problem description in bug 364984 comment 5)

An attempt for a solution is to skip other scrolling attempts, after the first one failed, when we have a virtual folder.

Would probably be better to use folder.getTotalMessages(), but this returns the message count of all folders the virtual folder is based upon and not the actual count of found messages.
Attachment #273269 - Flags: review?(mnyromyr)
(Assignee)

Comment 1

12 years ago
Comment on attachment 273269 [details] [diff] [review]
Skip other scrolling attempts for virtual folders

with patch v1 remember selected message stops working for virtual folders
Attachment #273269 - Attachment is obsolete: true
Attachment #273269 - Flags: review?(mnyromyr)
(Assignee)

Comment 2

12 years ago
Created attachment 273300 [details] [diff] [review]
Don't try scrolling to message on virtual folders before search is finished

With this patch ScrollToMessageAfterFolderLoad() is only called for non virtual folders in msgMail3PaneWindow.js' OnItemEvent. Scrolling for virtual folders is done in searchBar.js' OnSearchDone function, if there is a message to scroll to.
Attachment #273300 - Flags: review?(mnyromyr)

Comment 3

12 years ago
Comment on attachment 273300 [details] [diff] [review]
Don't try scrolling to message on virtual folders before search is finished

>Index: mailnews/base/resources/content/msgMail3PaneWindow.js
>===================================================================
>+             // scroll to message for virtual folders in searchBar.js

Add the actual function name, too. Eg.
// scroll to message for virtual folders is done in onSearchDone in searchBar.js

>Index: mailnews/base/resources/content/searchBar.js
>===================================================================
>+          if(vFolder.getTotalMessages(false) > 0)

Space missing after if.


r=me with that.
Attachment #273300 - Flags: review?(mnyromyr) → review+
(Assignee)

Comment 4

12 years ago
Created attachment 274376 [details] [diff] [review]
Previous patch including review comments

David, the patch should work for Thunderbird too. If the way this is done is fine for you, I'll attach the patch for Thunderbird in bug 364984 (though I can't test it myself).
Attachment #274376 - Flags: superreview?(bienvenu)
Attachment #274376 - Flags: review+

Comment 5

11 years ago
Comment on attachment 274376 [details] [diff] [review]
Previous patch including review comments

makes sense, thx!
Attachment #274376 - Flags: superreview?(bienvenu) → superreview+
Keywords: checkin-needed

Comment 6

11 years ago
Landed on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Keywords: checkin-needed
QA Contact: mail
Resolution: --- → FIXED
Bruno, if you could attach the patch on bug 364984 I could test it on my local box.
You need to log in before you can comment on or make changes to this bug.