Skip to content

Commit

Permalink
chore: followup bug 1933485: Ensure tab groups always appear in histo…
Browse files Browse the repository at this point in the history
…ry menus
  • Loading branch information
onemen committed Dec 13, 2024
1 parent 8557115 commit 3886a3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 1 addition & 8 deletions addon/chrome/content/session/sessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,15 +846,8 @@ var TMP_ClosedTabs = {
}
const {closedTabSet, closedTabIndex} =
TabmixSvc.SessionStore._getClosedTabStateFromUnifiedIndex(winData, closedTabState);
const groupIds = closedTabSet?.map(tabData => tabData.state.groupId);
const closedTab = TabmixSvc.SessionStore.removeClosedTabData(winData, closedTabSet, closedTabIndex);
// temporary fix for bug 1933966
for (const groupId of groupIds) {
const group = TabmixSvc.SessionStore.getClosedTabGroup(source, groupId);
if (group?.tabs.length === 0) {
TabmixSvc.SessionStore.forgetClosedTabGroup(source, group.id);
}
}
TabmixSvc.SessionStore._cleanupOrphanedClosedGroups(winData);

TabmixSvc.SessionStore._notifyOfClosedObjectsChange();
return closedTab;
Expand Down
1 change: 1 addition & 0 deletions types/addon.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ declare namespace SessionStoreNS {
const _windows: Record<SSi, WindowState>;
const _closedWindows: ClosedWindowState[];
let _closedObjectsChanged: boolean;
function _cleanupOrphanedClosedGroups(winData: WindowState): void;
function _isWindowLoaded(aWindow: Window): boolean;
function _notifyOfClosedObjectsChange(): void;
function _getStateForClosedTabsAndClosedGroupTabs(winData: WindowState, aIndex: number): ClosedTabData;
Expand Down

0 comments on commit 3886a3d

Please sign in to comment.