mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 02:22:25 +00:00
Ensure Feedly sign-in has a presentationAnchor — don’t run it if not.
This commit is contained in:
1 parent
a925110680
commit
42e22ecf37
1 file changed
+5
-1
@@ -13,7 +13,7 @@ import Account
|
||||
/// The list of account types the user picks from. Pushed onto the Settings navigation stack.
|
||||
struct AddAccountView: View {
|
||||
|
||||
/// Window the Feedly OAuth sheet attaches to. Nil is tolerated by the operation.
|
||||
/// Window the Feedly OAuth sheet attaches to. Feedly can’t be added without one.
|
||||
let presentationAnchor: ASPresentationAnchor?
|
||||
/// Called after an account is added so the host can pop this screen.
|
||||
let didAddAccount: () -> Void
|
||||
@@ -162,6 +162,10 @@ struct AddAccountView: View {
|
||||
}
|
||||
|
||||
private func startOAuth(for accountType: AccountType) {
|
||||
guard let presentationAnchor else {
|
||||
return
|
||||
}
|
||||
|
||||
oauthHandler.didCreateAccount = { account in
|
||||
account.triggerRefreshAll()
|
||||
didAddAccount()
|
||||
|
||||
Reference in new issue
Block a user