diff --git a/Neon Vision Editor.xcodeproj/project.pbxproj b/Neon Vision Editor.xcodeproj/project.pbxproj index 9f47818..3eac503 100644 --- a/Neon Vision Editor.xcodeproj/project.pbxproj +++ b/Neon Vision Editor.xcodeproj/project.pbxproj @@ -361,7 +361,7 @@ CODE_SIGNING_ALLOWED = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 592; + CURRENT_PROJECT_VERSION = 593; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = CS727NF72U; ENABLE_APP_SANDBOX = YES; @@ -444,7 +444,7 @@ CODE_SIGNING_ALLOWED = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 592; + CURRENT_PROJECT_VERSION = 593; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = CS727NF72U; ENABLE_APP_SANDBOX = YES; diff --git a/Neon Vision Editor/UI/ContentView.swift b/Neon Vision Editor/UI/ContentView.swift index 2ed5f3a..17c5254 100644 --- a/Neon Vision Editor/UI/ContentView.swift +++ b/Neon Vision Editor/UI/ContentView.swift @@ -1480,7 +1480,8 @@ struct ContentView: View { handleDroppedFileNotification(notif) } - return viewWithClipboardEvents + let viewWithDroppedFileLoadEvents = AnyView( + viewWithClipboardEvents .onReceive(NotificationCenter.default.publisher(for: .droppedFileLoadStarted)) { notif in droppedFileLoadInProgress = true droppedFileProgressDeterminate = (notif.userInfo?["isDeterminate"] as? Bool) ?? true @@ -1524,6 +1525,10 @@ struct ContentView: View { droppedFileLoadInProgress = false } } + ) + + let viewWithSelectionObservers = AnyView( + viewWithDroppedFileLoadEvents .onChange(of: viewModel.selectedTab?.id) { _, _ in editorExternalMutationRevision &+= 1 updateLargeFileModeForCurrentContext() @@ -1562,6 +1567,9 @@ struct ContentView: View { showRemoteSaveIssueDialog = true } } + ) + + return viewWithSelectionObservers .onChange(of: showRemoteSaveIssueDialog) { _, isPresented in if !isPresented, viewModel.pendingRemoteSaveIssue != nil { viewModel.dismissRemoteSaveIssue()