Ensure Feedly sign-in has a presentationAnchor — don’t run it if not.

This commit is contained in:
Brent Simmons committed 2026-10-08 21:24:49 -07:00
1 parent a925110680
commit 42e22ecf37
1 file changed
+5 -1
+5 -1
View File
@@ -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()