mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 05:35:29 +02:00
42 lines
1.7 KiB
C++
42 lines
1.7 KiB
C++
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
|
index 908743177d9f95e2e6549c689e7a493ca8668701..4b05b981d1e6ed370aa94536348ad7673a6c09fa 100644
|
|
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
|
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
|
@@ -3848,6 +3848,7 @@ var SessionStoreInternal = {
|
|
aWindow.gBrowser.selectedTab = newTab;
|
|
}
|
|
|
|
+ if (aTab.hasAttribute("zenDefaultUserContextId")) newTab.setAttribute("zenDefaultUserContextId", true);
|
|
// Restore the state into the new tab.
|
|
this.restoreTab(newTab, tabState, {
|
|
restoreImmediately: aRestoreImmediately,
|
|
@@ -5315,14 +5316,14 @@ var SessionStoreInternal = {
|
|
}
|
|
|
|
let tabbrowser = aWindow.gBrowser;
|
|
- let tabs = tabbrowser.tabs;
|
|
+ let tabs = aWindow.ZenWorkspaces.allStoredTabs;
|
|
/** @type {WindowStateData} */
|
|
let winData = this._windows[aWindow.__SSi];
|
|
let tabsData = (winData.tabs = []);
|
|
|
|
// update the internal state data for this window
|
|
for (let tab of tabs) {
|
|
- if (tab == aWindow.FirefoxViewHandler.tab) {
|
|
+ if (tab == aWindow.FirefoxViewHandler.tab || tab.hasAttribute("zen-empty-tab")) {
|
|
continue;
|
|
}
|
|
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
|
|
@@ -6042,6 +6043,12 @@ var SessionStoreInternal = {
|
|
|
|
// Most of tabData has been restored, now continue with restoring
|
|
// attributes that may trigger external events.
|
|
+ if (tabData.zenEssential) {
|
|
+ tab.setAttribute("zen-essential", "true");
|
|
+ }
|
|
+ if (tabData.zenIsEmpty) {
|
|
+ tab.setAttribute("zen-empty-tab", "true");
|
|
+ }
|
|
|
|
if (tabData.pinned) {
|
|
tabbrowser.pinTab(tab);
|