Closed Bug 510643 Opened 15 years ago Closed 15 years ago

Thread pane is cleared after rebuild-index of local mail folder

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0rc1

People

(Reporter: World, Assigned: Bienvenu)

References

(Depends on 1 open bug)

Details

(Keywords: regression, Whiteboard: [no l10n impact])

Attachments

(2 files, 3 obsolete files)

Thread pane is cleared after rebuild-index of local mail folder.
Thread pane display is recovered by "click of other folder, then click folder again". 

This bug doesn't occur on IMAP folder.
If IMAP folder, thread pane is cleared after rebuild-index, but thread pane is automatically refreshed just after the clear of thread pane.

[ Build ID ]
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3pre) Gecko/20090813 Shredder/3.0b4pre

[ Steps to reproduce ]
1. Click(open) Inbox (local mail folder)
2. Folder Properties/Rebuild Index => Thread pane is cleared
3. Close Folder Properties panel.
4. Click other local mail folder(Drafts), then click Inbox again.
    => Thread pane is refreshed
XBL bindings related issue like Bug 506199?
Or simply issue of "no thread pane refresh" after "thread pane clear"?
Bug 505044 is relevant?(root cause?).
> Bug 505044 Selection lost when leaving a folder and coming back into it
>             (mailnews.remember_selected_message doesn't work)
I really think this is a blocker - to the user, it looks like they lost all their mail.
Assignee: nobody → bienvenu
Flags: blocking-thunderbird3+
Assignee: bienvenu → nobody
Keywords: regression
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird 3.0rc1
Whiteboard: [no l10n impact]
I believe the way this used to work is that someone (the folder pane?) listened for the folderLoaded notification and rebuilt the view - the folder loaded notification is the only notification I see getting sent in this case, so it seems like that must be how it worked.
in SM (and prev versions of TB), the 3 pane ui listened for the folder loaded notification and did the reload. Now it looks like its up to the dbViewWrapper, though it may not be quite ready for this situation.
Attached patch possible fix (obsolete) — Splinter Review
this fixes it for me - it's a bit hacky trying to convince the folderDisplay widget and the folder tree that selection really needs to do something, but it does work.
Attachment #409926 - Flags: review?(sid.bugzilla)
Whiteboard: [no l10n impact] → [no l10n impact][has patch for review]
Attachment #409926 - Attachment is obsolete: true
Attachment #409930 - Flags: review?(sid.bugzilla)
Attachment #409926 - Flags: review?(sid.bugzilla)
Attachment #409930 - Attachment is obsolete: true
Attachment #409941 - Flags: review?(sid.bugzilla)
Attachment #409930 - Flags: review?(sid.bugzilla)
Attachment #409941 - Flags: review?(sid.bugzilla) → review-
Comment on attachment 409941 [details] [diff] [review]
messed up braces playing with the mercurial queue...

>diff --git a/mail/base/content/folderPane.js b/mail/base/content/folderPane.js
>       }
>-      folder.updateFolder(msgWindow);
>+      // We expect these errors, so swallow them but re-throw any others.
>+      try {
>+        folder.updateFolder(msgWindow);
>+      } catch (e) { if (e.result != Cr.NS_ERROR_NOT_INITIALIZED &&

Could you please move the catch to the next line? Unfortunately, the whole file is a mish-mash of styles, but I think it's worthwhile to make an attempt to maintain consistency within a function.

>+                       e.result != NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE) {
>+                     throw(e);
>+                  }
>+      }

A more convenient syntax is:

catch (e if e.result == Cr.NS_ERROR_NOT_INITIALIZED ||
            e.result == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)

(from <https://developer.mozilla.org/en/core_javascript_1.5_guide/exception_handling_statements/try...catch_statement#The_catch_Block>, the section on conditional catch blocks)

I can't find where NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE is defined.

>+      gFolderTreeView.selection.clearSelection();
>+      gFolderDisplay.show(null);
>+      gFolderTreeView.selectFolder(folder);

gFolderDisplay.select(folder) seems to work here instead of these three lines, and avoids the momentary display of account central.
(In reply to comment #9)
> I can't find where NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE is defined.

In fact, I can't find where Cr is defined, either.
Whiteboard: [no l10n impact][has patch for review] → [no l10n impact][needs updated patch]
Attached patch much simpler fixSplinter Review
thx, yeah, that's much nicer.
Attachment #409941 - Attachment is obsolete: true
Attachment #409944 - Flags: review?(sid.bugzilla)
Attachment #409944 - Flags: review?(sid.bugzilla) → review+
fix checked into 3.0 branch and trunk.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [no l10n impact][needs updated patch] → [no l10n impact]
Depends on: 550286
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: