Comment 49 for bug 397574

Revision history for this message
In , Alta88-t (alta88-t) wrote :

(In reply to Alfred Peters III from comment #42)
> (In reply to alta88 from comment #41)
>
> Is there a reason not to do it that way?

everyone should use the extension, how is Tb usable without wide thread view ;) which was attempted and abandoned in bug 215661.

back to the issue: although the setTimeout on ReloadMessage() works, it's not the best way and not how i do it any longer in the extension. the document in messagepane is not destroyed and therefore does not need to be reloaded/reread. if you install the extension in Tb52 you will note how smooth and jank free the layout changes are.

to do this correctly here, try this in place of the ReloadMessage() line and make sure to test both single and multimessage (conversations):

// For some layout changes, the doc in messagepane or multimessage is
// not destroyed, so don't create it again.
let browser = getBrowser();
if (browser && browser.contentDocument &&
    browser.contentDocument.URL == "about:blank") {
  if (!gMessageDisplay.singleMessageDisplay)
    gSummaryFrameManager.pendingOrLoadedUrl = "about:blank";

  gMessageDisplay.makeInactive();
  setTimeout(() => {gFolderDisplay.makeActive();});
}