Handles single and multiple sync failures

If a single sync failure is encountered a sheet is presented which allows the user to update their credentials.

If multiple sync failures are encountered an alert is shown listing the accounts which encountered errors. On iOS, this alert can take the user into Settings, but there is no obvious way to programatically pesent macOS preferences.
This commit is contained in:
Stuart Breckenridge
2020-07-25 16:40:04 +08:00
parent 75b9264d44
commit 673f0ce718
12 changed files with 328 additions and 45 deletions

View File

@@ -162,7 +162,9 @@ extension EditAccountCredentialsModel {
accountIsUpdatingCredentials = true
let updateAccount = OAuthAccountAuthorizationOperation(accountType: .feedly)
updateAccount.delegate = self
#if os(macOS)
updateAccount.presentationAnchor = NSApplication.shared.windows.last
#endif
MainThreadOperationQueue.shared.add(updateAccount)
}

View File

@@ -83,7 +83,6 @@ struct EditAccountCredentialsView: View {
}
.frame(idealWidth: 300, idealHeight: 200, alignment: .top)
.padding()
}
}