mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[ios] Switched OSM profile to SwiftUI and redesigned it
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Yannik Bloscheck
parent
db1ef9b148
commit
15c7e71866
@@ -135,10 +135,14 @@
|
||||
component.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
||||
}
|
||||
if let code = components.first {
|
||||
Bridging.saveOauthToken(from: code)
|
||||
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)
|
||||
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)
|
||||
}
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user