Closed Bug 389118 Opened 17 years ago Closed 17 years ago

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

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

Attachments

(2 files, 1 obsolete file)

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)
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)
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 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+
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 on attachment 274376 [details] [diff] [review]
Previous patch including review comments

makes sense, thx!
Attachment #274376 - Flags: superreview?(bienvenu) → superreview+
Landed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 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.

Attachment

General

Created:
Updated:
Size: