mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-30 03:47:47 +00:00
feat: Dont bring unpinned tabs to new windows if window sync is disabled, b=no-bug, c=no-component
This commit is contained in:
@@ -543,6 +543,10 @@ export class nsZenSessionManager {
|
||||
this.#restoreWindowData(newWindow);
|
||||
}
|
||||
newWindow.tabs = this.#filterUnusedTabs(newWindow.tabs || []);
|
||||
if (!lazy.gWindowSyncEnabled) {
|
||||
// Don't bring over any unpinned tabs if window sync is disabled.
|
||||
newWindow.tabs = newWindow.tabs.filter((tab) => tab.pinned);
|
||||
}
|
||||
|
||||
// These are window-specific from the previous window state that
|
||||
// we don't want to restore into the new window. Otherwise, new
|
||||
|
||||
@@ -1087,7 +1087,7 @@ class nsZenWindowSync {
|
||||
}
|
||||
tab._zenContentsVisible = true;
|
||||
tab.id = this.#newTabSyncId;
|
||||
if (isUnsyncedWindow) {
|
||||
if (isUnsyncedWindow || !lazy.gWindowSyncEnabled) {
|
||||
return;
|
||||
}
|
||||
this.#runOnAllWindows(window, (win) => {
|
||||
|
||||
Reference in New Issue
Block a user