mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-21 06:45:42 +00:00
fix: Fixed 'restore previous tabs' ignored when only pinned sync is enabled, b=closes #12297, c=tabs
This commit is contained in:
@@ -568,7 +568,10 @@ export class nsZenSessionManager {
|
||||
// as they should be the same as the ones in the sidebar.
|
||||
if (lazy.gSyncOnlyPinnedTabs) {
|
||||
let pinnedTabs = (sidebar.tabs || []).filter((tab) => tab.pinned);
|
||||
let unpinedWindowTabs = (aWindowData.tabs || []).filter((tab) => !tab.pinned);
|
||||
let unpinedWindowTabs = [];
|
||||
if (!this.#shouldRestoreOnlyPinned) {
|
||||
unpinedWindowTabs = (aWindowData.tabs || []).filter((tab) => !tab.pinned);
|
||||
}
|
||||
aWindowData.tabs = [...pinnedTabs, ...unpinedWindowTabs];
|
||||
|
||||
// We restore ALL the split view data in the sidebar, if the group doesn't exist in the window,
|
||||
|
||||
@@ -532,7 +532,9 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
const isEssential = contextTab.getAttribute("zen-essential");
|
||||
const zenAddEssential = document.getElementById("context_zen-add-essential");
|
||||
const zenResetPinnedTab = document.getElementById("context_zen-reset-pinned-tab");
|
||||
const zenReplacePinnedUrl = document.getElementById("context_zen-replace-pinned-url-with-current");
|
||||
const zenReplacePinnedUrl = document.getElementById(
|
||||
"context_zen-replace-pinned-url-with-current"
|
||||
);
|
||||
[zenResetPinnedTab, zenReplacePinnedUrl].forEach((element) => {
|
||||
if (element) {
|
||||
element.hidden = !isVisible;
|
||||
|
||||
Reference in New Issue
Block a user