mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 06:03:45 +00:00
[ios] Changed settings to SwiftUI
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
090ed5044a
commit
fdbb41e0fd
@@ -138,9 +138,7 @@
|
||||
Task(priority: .userInitiated) {
|
||||
await Profile.saveAuthorizationToken(from: code)
|
||||
DispatchQueue.main.sync {
|
||||
let window = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow
|
||||
window?.rootViewController?.presentedViewController?.navigationController?.popToRootViewController(animated: true)
|
||||
window?.rootViewController?.presentedViewController?.dismiss(animated: true)
|
||||
NotificationCenter.default.post(name: SafariView.dismissNotificationName, object: nil)
|
||||
}
|
||||
}
|
||||
return true
|
||||
@@ -149,9 +147,7 @@
|
||||
}
|
||||
case .incorrect:
|
||||
if url.absoluteString.starts(with: "cm://oauth2/osm/callback") {
|
||||
let window = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow
|
||||
window?.rootViewController?.presentedViewController?.navigationController?.popToRootViewController(animated: true)
|
||||
window?.rootViewController?.presentedViewController?.dismiss(animated: true)
|
||||
NotificationCenter.default.post(name: SafariView.dismissNotificationName, object: nil)
|
||||
}
|
||||
// Invalid URL or API parameters.
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user