additional work on iOS sheets

This commit is contained in:
Stuart Breckenridge
2020-12-05 22:58:11 +08:00
parent ad678f2fc1
commit 762417e2ba
8 changed files with 171 additions and 36 deletions

View File

@@ -19,6 +19,16 @@ class AddFeedlyViewModel: ObservableObject, OAuthAccountAuthorizationOperationDe
@Published var username: String = ""
@Published var password: String = ""
func authenticateFeedly() {
isAuthenticating = true
let addAccount = OAuthAccountAuthorizationOperation(accountType: .feedly)
addAccount.delegate = self
#if os(macOS)
addAccount.presentationAnchor = NSApplication.shared.windows.last
#endif
MainThreadOperationQueue.shared.add(addAccount)
}
func oauthAccountAuthorizationOperation(_ operation: OAuthAccountAuthorizationOperation, didCreate account: Account) {
isAuthenticating = false