https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
v

Vitaliy Zarubin

12/26/2022, 8:44 AM
Hi! Can you please tell me how to delay the response? On coroutines, I would do something similar.
stackoverflow 1
It works )
Copy code
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
    if value == range {
        onValueChangeFinished(value.map { Double($0) })
    }
}
c

Corey

12/26/2022, 11:27 AM
If you are using combine you can use debounce
debounce(for: .milliseconds(500), scheduler: DispatchQueue.main)
45 Views