Split ContentView editor event chains for Xcode 16.4 CI

This commit is contained in:
h3p 2026-03-30 19:42:37 +02:00
parent 799472bdfa
commit 85dc0b215d
No known key found for this signature in database
2 changed files with 11 additions and 3 deletions

View file

@ -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;

View file

@ -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()