Skip to content

Commit

Permalink
Bugfix FXIOS-8453 [v123.3] Fix undo all tabs (backport #18965) (#18988)
Browse files Browse the repository at this point in the history
(cherry picked from commit 64975f6)

Co-authored-by: OrlaM <[email protected]>
  • Loading branch information
mergify[bot] and OrlaM authored Mar 4, 2024
1 parent 9e23f38 commit b679cdd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion firefox-ios/Client/TabManagement/Legacy/LegacyTabManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -643,17 +643,26 @@ class LegacyTabManager: NSObject, FeatureFlaggable, TabManager, TabEventHandler
@MainActor
func removeAllTabs(isPrivateMode: Bool) async {
let currentModeTabs = tabs.filter { $0.isPrivate == isPrivateMode }
backupCloseTabs = currentModeTabs
if let tab = selectedTab, tab.isPrivate == isPrivateMode {
backupCloseTab = BackupCloseTab(tab: tab,
restorePosition: tabs.firstIndex(of: tab))
}
backupCloseTabs = tabs
for tab in currentModeTabs {
await self.removeTab(tab.tabUUID)
}
storeChanges()
}

func undoCloseAllTabs() {
guard !backupCloseTabs.isEmpty else { return }
tabs = backupCloseTabs
storeChanges()
backupCloseTabs = [Tab]()
if backupCloseTab != nil {
selectTab(backupCloseTab?.tab)
backupCloseTab = nil
}
}

@MainActor
Expand Down

1 comment on commit b679cdd

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error! Details

InterpreterError at template.tasks[0].extra[0].treeherder[1].symbol: unknown context value cron

Please sign in to comment.