mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-25 14:16:10 +00:00
fix: Fixed migration issue when clear history is enabled, b=closes #11993, c=flatpak, workspaces
This commit is contained in:
@@ -20,7 +20,6 @@ finish-args:
|
||||
- --socket=cups
|
||||
- --persist=.zen
|
||||
- --env=DICPATH=/usr/share/hunspell
|
||||
- --filesystem=xdg-config/gtk-3.0:ro
|
||||
- --filesystem=xdg-download:rw
|
||||
- --filesystem=/run/.heim_org.h5l.kcm-socket
|
||||
- --filesystem=xdg-run/speech-dispatcher:ro
|
||||
|
||||
@@ -627,6 +627,11 @@
|
||||
gZenWorkspaces
|
||||
.changeWorkspaceShortcut(isNearLeftEdge ? -1 : 1, false, /* Disable wrapping */ true)
|
||||
.then((spaceChanged) => {
|
||||
if (AppConstants.platform !== "macosx") {
|
||||
// See the hack in #createDragImageForTabs for more details which
|
||||
// explains why we need to do this on non-macOS platforms.
|
||||
return;
|
||||
}
|
||||
let tabs = this.originalDragImageArgs[0].children;
|
||||
const { isDarkMode, isExplicitMode } =
|
||||
gZenThemePicker.getGradientForWorkspace(spaceChanged);
|
||||
|
||||
@@ -205,7 +205,7 @@ export class nsZenSessionManager {
|
||||
// object will always be empty after migration because we haven't
|
||||
// gotten the opportunity to save the session yet.
|
||||
if (this._shouldRunMigration) {
|
||||
this.#runStateMigration(initialState);
|
||||
initialState = this.#runStateMigration(initialState);
|
||||
}
|
||||
// If there are no windows, we create an empty one. By default,
|
||||
// firefox would create simply a new empty window, but we want
|
||||
@@ -215,7 +215,11 @@ export class nsZenSessionManager {
|
||||
if (!initialState?.windows?.length) {
|
||||
this.log("No windows found in initial state, creating an empty one");
|
||||
initialState ||= {};
|
||||
initialState.windows = this._shouldRunMigration ? [] : [{}];
|
||||
initialState.windows = [
|
||||
{
|
||||
tabs: [],
|
||||
},
|
||||
];
|
||||
}
|
||||
// When we don't have browser.startup.page set to resume session,
|
||||
// we only want to restore the pinned tabs into the new windows.
|
||||
@@ -295,6 +299,14 @@ export class nsZenSessionManager {
|
||||
this.log("Restoring tabs from last closed normal window");
|
||||
}
|
||||
}
|
||||
if (!initialState?.windows?.length) {
|
||||
initialState ||= {};
|
||||
initialState.windows = [
|
||||
{
|
||||
tabs: [],
|
||||
},
|
||||
];
|
||||
}
|
||||
for (const winData of initialState?.windows || []) {
|
||||
winData.spaces = this._migrationData?.spaces || [];
|
||||
if (winData.tabs) {
|
||||
@@ -312,6 +324,7 @@ export class nsZenSessionManager {
|
||||
// Save the state to the sidebar object so that it gets written
|
||||
// to the session file.
|
||||
delete this._migrationData;
|
||||
return initialState;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
|
||||
/* Mark workspaces indicator */
|
||||
.zen-current-workspace-indicator {
|
||||
--indicator-gap: var(--toolbarbutton-inner-padding);
|
||||
padding: calc(3px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
|
||||
--indicator-gap: calc(var(--toolbarbutton-inner-padding) - 1px);
|
||||
padding: calc(2px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
max-height: var(--zen-workspace-indicator-height);
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
@media (-moz-platform: windows) {
|
||||
& img {
|
||||
margin-bottom: -4px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.18b",
|
||||
"displayVersion": "1.18.1b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user