Clear split zoom when jumping to unread

This commit is contained in:
Lawrence Chen 2026-03-13 16:03:07 -07:00
parent 1e90981947
commit 02854441e9
No known key found for this signature in database

View file

@ -2205,12 +2205,16 @@ class TabManager: ObservableObject {
func focusTabFromNotification(_ tabId: UUID, surfaceId: UUID? = nil) {
let wasSelected = selectedTabId == tabId
let desiredPanelId = surfaceId ?? tabs.first(where: { $0.id == tabId })?.focusedPanelId
guard let tab = tabs.first(where: { $0.id == tabId }) else { return }
let desiredPanelId = surfaceId ?? tab.focusedPanelId
#if DEBUG
if let desiredPanelId {
AppDelegate.shared?.armJumpUnreadFocusRecord(tabId: tabId, surfaceId: desiredPanelId)
}
#endif
// Jump-to-unread should reveal the destination pane instead of keeping an old split-zoom
// state active around it.
tab.clearSplitZoom()
suppressFocusFlash = true
focusTab(tabId, surfaceId: desiredPanelId, suppressFlash: true)
if wasSelected {