Convert AccountDelegate.createFolder to async/await.

This commit is contained in:
Brent Simmons
2023-10-10 21:21:52 -07:00
parent 490095fd73
commit 378e116b5c
11 changed files with 95 additions and 84 deletions

View File

@@ -100,11 +100,10 @@ private extension AddFolderWindowController {
return
}
account.addFolder(folderName) { result in
switch result {
case .success:
break
case .failure(let error):
Task { @MainActor in
do {
try await account.addFolder(folderName)
} catch {
NSApplication.shared.presentError(error)
}
}