mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Adds Error Display for the handle(_: URL) function
Additionally, shortens validation code in AddAccount
This commit is contained in:
@@ -13,9 +13,10 @@ import OAuthSwift
|
||||
import Secrets
|
||||
import RSCore
|
||||
|
||||
@MainActor
|
||||
|
||||
public final class EnableExtensionViewModel: NSObject, ObservableObject, OAuthSwiftURLHandlerType, ASWebAuthenticationPresentationContextProviding, Logging {
|
||||
|
||||
@Published public var showExtensionError: (Error?, Bool) = (nil, false)
|
||||
private var extensionPointType: ExtensionPoint.Type?
|
||||
private var oauth: OAuthSwift?
|
||||
private var callbackURL: URL? = nil
|
||||
@@ -146,7 +147,7 @@ public final class EnableExtensionViewModel: NSObject, ObservableObject, OAuthSw
|
||||
if case ASWebAuthenticationSessionError.canceledLogin = error {
|
||||
print("Login cancelled.")
|
||||
} else {
|
||||
//self.presentError(error)
|
||||
self.showExtensionError = (error, true)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user