Skip to content

Commit ee40e75

Browse files
- Fixed concurrency issues
1 parent b099d14 commit ee40e75

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sources/WelcomeWindow/Model/NSDocumentController+Extensions.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,15 @@ extension NSDocumentController {
187187
if accessGranted {
188188
RecentsStore.endAccessing(url)
189189
}
190-
NSAlert(error: error).runModal()
190+
DispatchQueue.main.async {
191+
NSAlert(error: error).runModal()
192+
}
191193
onError(error)
192194
} else {
193195
RecentsStore.documentOpened(at: url)
194-
NSApp.activate(ignoringOtherApps: true)
196+
DispatchQueue.main.async {
197+
NSApp.activate(ignoringOtherApps: true)
198+
}
195199
onCompletion()
196200
}
197201
}

0 commit comments

Comments
 (0)