From 676e66c2987d3ba00ff23c0a36a9bdcd62497c28 Mon Sep 17 00:00:00 2001 From: Milen Pivchev Date: Thu, 23 Apr 2026 15:34:17 +0200 Subject: [PATCH 1/3] WIP Signed-off-by: Milen Pivchev --- .../Views/ServerAddressView.swift | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift b/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift index 272b893..24f7600 100644 --- a/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift +++ b/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift @@ -29,7 +29,7 @@ public typealias BeginPollingHandler = (_ url: URL, _ dismiss: @MainActor @Senda /// - Parameters: /// - token: The polling token the login flow is identified by uniquely. /// -public typealias CancelPollingHandler = (_ token: String) -> Void +public typealias CancelPollingHandler = () -> Void /// /// The full screen view in which a user enters the address of the server to log in on. @@ -106,11 +106,6 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { /// @State var loginAddress: URL? - /// - /// The temporarily known token to identify the login flow belonging to this view. - /// - @State var pollingToken: String? - // MARK: - Implementation public var body: some View { @@ -277,9 +272,10 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { dismiss() } - if let user { - url.append(queryItems: [URLQueryItem(name: "user", value: user)]) - } + //TODO: Temporary disabled until +// if let user { +// url.append(queryItems: [URLQueryItem(name: "user", value: user)]) +// } beginWebView(url) } catch { @@ -302,10 +298,7 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { /// - The login completed successfully. /// func endWebView() { - if let pollingToken { - cancelPolling(pollingToken) - self.pollingToken = nil - } + cancelPolling() isActive = false isPresentingWebView = false @@ -338,7 +331,7 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { } beginPolling: { _, _ in print("Begin polling!") return URL(string: "about:blank")! - } cancelPolling: { _ in + } cancelPolling: { print("Cancel polling!") } } @@ -355,7 +348,7 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { } beginPolling: { _, _ in print("Begin polling!") return URL(string: "about:blank")! - } cancelPolling: { _ in + } cancelPolling: { print("Cancel polling!") } } From 47ce0ae7205914e378d5dec6fe02491c35b11fa8 Mon Sep 17 00:00:00 2001 From: Milen Pivchev Date: Thu, 23 Apr 2026 15:36:31 +0200 Subject: [PATCH 2/3] WIP Signed-off-by: Milen Pivchev --- Sources/SwiftNextcloudUI/Views/ServerAddressView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift b/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift index 24f7600..baec1cf 100644 --- a/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift +++ b/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift @@ -272,7 +272,7 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { dismiss() } - //TODO: Temporary disabled until + //TODO: Temporary disabled until https://github.com/nextcloud/server/issues/59874 is resolved. // if let user { // url.append(queryItems: [URLQueryItem(name: "user", value: user)]) // } From 5aa0f8e0afc1fb7b51609555d4dbb174d583c09d Mon Sep 17 00:00:00 2001 From: Milen Pivchev Date: Mon, 27 Apr 2026 13:27:39 +0200 Subject: [PATCH 3/3] Remove TODO Signed-off-by: Milen Pivchev --- Sources/SwiftNextcloudUI/Views/ServerAddressView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift b/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift index baec1cf..11243da 100644 --- a/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift +++ b/Sources/SwiftNextcloudUI/Views/ServerAddressView.swift @@ -272,7 +272,7 @@ public struct ServerAddressView: View, QRCodeParsing, URLSanitizing { dismiss() } - //TODO: Temporary disabled until https://github.com/nextcloud/server/issues/59874 is resolved. +// Temporary disabled until https://github.com/nextcloud/server/issues/59874 is resolved. // if let user { // url.append(queryItems: [URLQueryItem(name: "user", value: user)]) // }