mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-28 23:56:11 +00:00
feat: Fixed windows not initializing when window sync is disabled, b=closes #11999, p=#12015
This commit is contained in:
@@ -345,7 +345,7 @@ export class nsZenSessionManager {
|
||||
saveState(state) {
|
||||
let windows = state?.windows || [];
|
||||
windows = windows.filter((win) => this.#isWindowSaveable(win));
|
||||
if (!windows.length || !lazy.gWindowSyncEnabled) {
|
||||
if (!windows.length) {
|
||||
// Don't save (or even collect) anything in permanent private
|
||||
// browsing mode. We also don't want to save if there are no windows.
|
||||
return;
|
||||
@@ -525,7 +525,7 @@ export class nsZenSessionManager {
|
||||
* Whether this new window is being restored from a closed window.
|
||||
*/
|
||||
restoreNewWindow(aWindow, SessionStoreInternal, fromClosedWindow = false) {
|
||||
if (aWindow.gZenWorkspaces?.privateWindowOrDisabled || !lazy.gWindowSyncEnabled) {
|
||||
if (aWindow.gZenWorkspaces?.privateWindowOrDisabled) {
|
||||
return;
|
||||
}
|
||||
this.log("Restoring new window with Zen session data");
|
||||
|
||||
@@ -140,7 +140,7 @@ class nsZenWindowSync {
|
||||
}
|
||||
|
||||
init() {
|
||||
if (!lazy.gWindowSyncEnabled || this.#initialized) {
|
||||
if (this.#initialized) {
|
||||
return;
|
||||
}
|
||||
this.#initialized = true;
|
||||
@@ -309,6 +309,9 @@ class nsZenWindowSync {
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (!lazy.gWindowSyncEnabled && !UNSYNCED_WINDOW_EVENTS.includes(aEvent.type)) {
|
||||
return;
|
||||
}
|
||||
if (INSTANT_EVENTS.includes(aEvent.type)) {
|
||||
this.#handleNextEvent(aEvent);
|
||||
return;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.18.1b",
|
||||
"displayVersion": "1.18.2b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user