diff --git a/Sources/ISOInspectorApp/AppShellView.swift b/Sources/ISOInspectorApp/AppShellView.swift index 2a2a945e..f759c984 100644 --- a/Sources/ISOInspectorApp/AppShellView.swift +++ b/Sources/ISOInspectorApp/AppShellView.swift @@ -160,7 +160,11 @@ if shouldShowCorruptionRibbon { CorruptionWarningRibbon( metrics: windowController.issueMetrics, - onTap: windowController.focusIntegrityDiagnostics, + onTap: { + if !showInspector { toggleInspectorVisibility() } + windowController.focusIntegrityDiagnostics() + dismissCorruptionRibbon() + }, onDismiss: dismissCorruptionRibbon ).padding(.horizontal).transition( .move(edge: .top).combined(with: .opacity)) diff --git a/Sources/ISOInspectorApp/State/Services/SessionPersistenceService.swift b/Sources/ISOInspectorApp/State/Services/SessionPersistenceService.swift index 2c618f4e..d3c488d2 100644 --- a/Sources/ISOInspectorApp/State/Services/SessionPersistenceService.swift +++ b/Sources/ISOInspectorApp/State/Services/SessionPersistenceService.swift @@ -58,14 +58,14 @@ } sessionFileIDs = Dictionary( - uniqueKeysWithValues: sortedFiles.map { file in + sortedFiles.map { file in (canonicalIdentifier(for: file.recent.url), file.id) - }) + }, uniquingKeysWith: { first, _ in first }) sessionBookmarkDiffs = Dictionary( - uniqueKeysWithValues: sortedFiles.map { file in + sortedFiles.map { file in (canonicalIdentifier(for: file.recent.url), file.bookmarkDiffs) - }) + }, uniquingKeysWith: { first, _ in first }) pendingSessionSnapshot = snapshot }