@@ -167,14 +167,17 @@ struct ServiceSelectionScreen: View {
167167 . foregroundStyle ( . secondary)
168168 }
169169
170- let handler = state. createLoginHandler (
171- platformType: node. platformType,
172- host: node. host,
173- methodType: selectedMethod. wrappedValue,
174- redirectUri: nil ,
170+ LoginFlowView (
171+ handler: {
172+ state. createLoginHandler (
173+ platformType: node. platformType,
174+ host: node. host,
175+ methodType: selectedMethod. wrappedValue,
176+ redirectUri: nil ,
177+ )
178+ } ,
179+ authenticateURL: authenticate ( url: )
175180 )
176-
177- LoginFlowView ( handler: handler, authenticateURL: authenticate ( url: ) )
178181 . id ( " \( key) - \( selectedMethod. wrappedValue) " )
179182
180183 LoginAgreementView (
@@ -390,9 +393,10 @@ struct ReloginScreen: View {
390393 . labelsHidden ( )
391394 }
392395
393- let handler = state. createLoginHandler ( methodType: selectedMethod. wrappedValue)
394396 LoginFlowView (
395- handler: handler,
397+ handler: {
398+ state. createLoginHandler ( methodType: selectedMethod. wrappedValue)
399+ } ,
396400 authenticateURL: authenticate ( url: )
397401 )
398402 . id ( " \( target. accountKey) - \( selectedMethod. wrappedValue) " )
@@ -424,11 +428,11 @@ private struct LoginFlowView: View {
424428 @State private var webCookieInitialCookies : [ WebCookieSeed ] = [ ]
425429
426430 init (
427- handler: LoginMethodHandler ,
431+ handler: @escaping ( ) -> LoginMethodHandler ,
428432 authenticateURL: @escaping ( String ) async -> String ?
429433 ) {
430434 self . authenticateURL = authenticateURL
431- self . _presenter = . init( wrappedValue: . init( presenter: LoginFlowPresenter ( handler: handler) ) )
435+ self . _presenter = . init( wrappedValue: . init( presenter: LoginFlowPresenter ( handler: handler ( ) ) ) )
432436 }
433437
434438 var body : some View {
0 commit comments