Use MainActor Task instead of GCD.

This commit is contained in:
Brent Simmons
2023-07-09 22:54:55 -07:00
parent 1fa9fa5e10
commit 1be7e680d0
5 changed files with 19 additions and 20 deletions

View File

@@ -88,7 +88,7 @@ import Account
panel.beginSheetModal(for: hostWindow!) { result in
if result == NSApplication.ModalResponse.OK, let url = panel.url {
DispatchQueue.main.async {
Task { @MainActor in
let filename = url.lastPathComponent
let opmlString = OPMLExporter.OPMLString(with: account, title: filename)
do {