From 3063d0dd54246b0e0f51336d53f4d213dddf314d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Fri, 29 Dec 2023 13:47:22 +0300 Subject: [PATCH] d --- Modules/MeetupIdX/src/MeetupId.Aux.swift | 5 +++++ Modules/MeetupIdX/src/MeetupId.V.swift | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Modules/MeetupIdX/src/MeetupId.Aux.swift b/Modules/MeetupIdX/src/MeetupId.Aux.swift index 884cfa9..45e3634 100644 --- a/Modules/MeetupIdX/src/MeetupId.Aux.swift +++ b/Modules/MeetupIdX/src/MeetupId.Aux.swift @@ -1,6 +1,11 @@ import Foundation public extension MeetupId { + static func finishLoading(_ isLoading: Bool) -> Bool? { + guard isLoading else { return nil } + return false + } + static func formatId(_ s: String) -> String? { let digits = s.components(separatedBy: NSCharacterSet.decimalDigits.inverted).reduce("") { $0 + $1 } var r = "" diff --git a/Modules/MeetupIdX/src/MeetupId.V.swift b/Modules/MeetupIdX/src/MeetupId.V.swift index 0b58370..a45f41f 100644 --- a/Modules/MeetupIdX/src/MeetupId.V.swift +++ b/Modules/MeetupIdX/src/MeetupId.V.swift @@ -10,7 +10,8 @@ extension MeetupId { @StateObject var textField = Cord.TextField(K.textApp, K.textUI) let processors: [Any] = [ Bus.Processor(shouldEnableJoin, K.M, K.isJoinAvailable), - MeetupId.Debounce(5, formatId, K.textUI, K.textApp), + MeetupId.Debounce(0.2, formatId, K.textUI, K.textApp), + MeetupId.Delay(5, finishLoading, K.isLoading, K.isLoading), ] public init() { }