[Pkg-mozext-commits] [tabmixplus] 27/44: Firefox TabGroupsMigrator.migrate only create a backup file, bookmarks and a new tab to restore hidden tabs if tabs were actually removed from |state| by _removeHiddenTabGroupsFromState. fix changeset f28429fe7551

David Prévot taffit at moszumanska.debian.org
Fri Mar 18 20:57:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 0779cc1937bfcb8e5bc39a545a9f64787efa4cde
Author: onemen <tabmix.onemen at gmail.com>
Date:   Tue Mar 1 09:47:28 2016 +0200

    Firefox TabGroupsMigrator.migrate only create a backup file, bookmarks and a new tab to restore hidden tabs if tabs were actually removed from |state| by _removeHiddenTabGroupsFromState. fix changeset f28429fe7551
---
 chrome/content/session/session.js |  2 +-
 modules/TabGroupsMigrator.jsm     | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index 3b12961..4e95965 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -3083,7 +3083,7 @@ TabmixSessionManager = {
     let state = TabmixConvertSession.getSessionState(path, true);
     if (!this.tabViewInstalled) {
       // strips out the hidden tab groups and all tabview metadata
-      let hiddenTabState = this.TabmixGroupsMigrator.removeHiddenTabGroupsFromState(state);
+      let {hiddenTabState} = this.TabmixGroupsMigrator.removeHiddenTabGroupsFromState(state);
       tabsRemoved = hiddenTabState.windows.length > 0;
       if (caller == "firstwindowopen" && hiddenTabState &&
           this.showTabGroupRestorationPage) {
diff --git a/modules/TabGroupsMigrator.jsm b/modules/TabGroupsMigrator.jsm
index 11ac8bc..6d1869d 100644
--- a/modules/TabGroupsMigrator.jsm
+++ b/modules/TabGroupsMigrator.jsm
@@ -75,10 +75,10 @@ this.TabmixGroupsMigrator = {
 
     let bookmarkGroups = (session) => {
       let state = window.TabmixConvertSession.getSessionState(session, true);
-      let groupData = this.gatherGroupData(state);
-      if (groupData.exist) {
+      let {hiddenTabState, groupData} = this.removeHiddenTabGroupsFromState(state);
+      if (hiddenTabState.windows.length) {
         sm.showTabGroupRestorationPage = true;
-        this.bookmarkAllGroupsFromState(groupData.data);
+        this.bookmarkAllGroupsFromState(groupData);
       }
     };
 
@@ -187,12 +187,12 @@ this.TabmixGroupsMigrator = {
 
   removeHiddenTabGroupsFromState: function(state) {
     if (!TabGroupsMigrator) {
-      return {windows: []};
+      return {hiddenTabState: {windows: []}};
     }
 
     let groupData = TabGroupsMigrator._gatherGroupData(state);
     let hiddenTabState = TabGroupsMigrator._removeHiddenTabGroupsFromState(state, groupData);
-    return hiddenTabState;
+    return {hiddenTabState: hiddenTabState, groupData: groupData};
   },
 
   isGroupExist: function(groupData) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list