mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-01 13:21:54 +00:00
fix: Add debug info when an invalid folder is trying to restore, b=no-bug, c=common, folders
This commit is contained in:
@@ -51,3 +51,6 @@
|
||||
|
||||
- name: zen.view.context-menu.refresh
|
||||
value: false
|
||||
|
||||
- name: zen.view.borderless-fullscreen
|
||||
value: true
|
||||
|
||||
@@ -96,7 +96,8 @@ var ZenThemeModifier = {
|
||||
if (
|
||||
window.fullScreen &&
|
||||
window.gZenCompactModeManager?.preference &&
|
||||
!document.getElementById('tabbrowser-tabbox')?.hasAttribute('zen-split-view')
|
||||
!document.getElementById('tabbrowser-tabbox')?.hasAttribute('zen-split-view') &&
|
||||
Services.prefs.getBoolPref('zen.view.borderless-fullscreen', true)
|
||||
) {
|
||||
separation = 0;
|
||||
}
|
||||
|
||||
@@ -1615,11 +1615,6 @@
|
||||
const parentWorkingData = tabFolderWorkingData.get(stateData.parentId);
|
||||
if (parentWorkingData && parentWorkingData.node) {
|
||||
switch (stateData?.prevSiblingInfo?.type) {
|
||||
case 'group': {
|
||||
const folder = document.getElementById(stateData.prevSiblingInfo.id);
|
||||
folder.after(node);
|
||||
break;
|
||||
}
|
||||
case 'tab': {
|
||||
const tab = parentWorkingData.node.querySelector(
|
||||
`[zen-pin-id="${stateData.prevSiblingInfo.id}"]`
|
||||
@@ -1627,6 +1622,18 @@
|
||||
tab.after(node);
|
||||
break;
|
||||
}
|
||||
case 'group': {
|
||||
const folder = document.getElementById(stateData.prevSiblingInfo.id);
|
||||
if (folder) {
|
||||
folder.after(node);
|
||||
break;
|
||||
}
|
||||
// If we didn't find the group, we should debug it and continue to default case.
|
||||
console.warn(
|
||||
`Zen Folders: Could not find previous sibling group with id ${stateData.prevSiblingInfo.id} while restoring session.`
|
||||
);
|
||||
// @eslint-disable-next-line no-fallthrough
|
||||
}
|
||||
default: {
|
||||
// Should insert after zen-empty-tab
|
||||
const start =
|
||||
|
||||
Reference in New Issue
Block a user