Bug 1581508 - Improve RSS feed display in SeaMonkey. r=frg a=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Wed, 30 Oct 2019 19:43:06 +0100
changeset 32353 cb1d1717becead23a0ed83c5502a3f877edb06ef
parent 32352 20f92f529dad9e10cedf9564c74675550c8f51a5
child 32354 4f5c19b9a6b76266eb891548abc10f38d491bcf9
push id225
push userfrgrahl@gmx.net
push dateWed, 30 Oct 2019 18:44:45 +0000
treeherdercomm-esr60@4f5c19b9a6b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg
bugs1581508
Bug 1581508 - Improve RSS feed display in SeaMonkey. r=frg a=frg
suite/mailnews/content/mailWindowOverlay.js
--- a/suite/mailnews/content/mailWindowOverlay.js
+++ b/suite/mailnews/content/mailWindowOverlay.js
@@ -146,17 +146,18 @@ function view_init()
   let isFeed = gFolderDisplay &&
                ((gFolderDisplay.displayedFolder &&
                  gFolderDisplay.displayedFolder.server.type == "rss") ||
                 gFolderDisplay.selectedMessageIsFeed);
   document.getElementById("viewBodyMenu").hidden = isFeed;
 
   // Initialize the Show Feed Summary menu
   let viewFeedSummary = document.getElementById("viewFeedSummary");
-  viewFeedSummary.hidden = !isFeed;
+  viewFeedSummary.hidden = !isFeed ||
+    document.documentElement.getAttribute("windowtype") != "mail:3pane";
 
   let viewRssMenuItemIds = ["bodyFeedGlobalWebPage",
                             "bodyFeedGlobalSummary",
                             "bodyFeedPerFolderPref"];
   let checked = FeedMessageHandler.onSelectPref;
   for (let [index, id] of viewRssMenuItemIds.entries()) {
     document.getElementById(id)
             .setAttribute("checked", index == checked);
@@ -1608,16 +1609,19 @@ function MsgOpenSelectedMessages()
   // load in browser, per pref, otherwise open summary or web page in new window
   // or tab, per that pref.
   if (gFolderDisplay.selectedMessageIsFeed) {
     let msgHdr = gFolderDisplay.selectedMessage;
     if (document.documentElement.getAttribute("windowtype") == "mail:3pane" &&
         FeedMessageHandler.onOpenPref == FeedMessageHandler.kOpenToggleInMessagePane) {
       let showSummary = FeedMessageHandler.shouldShowSummary(msgHdr, true);
       FeedMessageHandler.setContent(msgHdr, showSummary);
+      FeedMessageHandler.onSelectPref =
+        showSummary ? FeedMessageHandler.kSelectOverrideSummary :
+                      FeedMessageHandler.kSelectOverrideWebPage;
       return;
     }
     if (FeedMessageHandler.onOpenPref == FeedMessageHandler.kOpenLoadInBrowser) {
       setTimeout(FeedMessageHandler.loadWebPage, 20, msgHdr, {browser:true});
       return;
     }
   }