mariofelesdossantosjr
11/28/2020, 12:42 PMSamkeene
11/28/2020, 2:28 PMmelatonina
11/29/2020, 1:05 PMfun Button.actions(): Flow<Unit> = callbackFlow {
val handler = EventHandler<ActionEvent> {
offer(Unit)
}
addEventHandler(ActionEvent.ACTION, handler)
awaitClose { removeEventHandler(ActionEvent.ACTION, handler) }
}
and then use the debounce()
method: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/debounce.htmlmelatonina
11/29/2020, 1:09 PMmelatonina
11/29/2020, 1:10 PMmariofelesdossantosjr
12/07/2020, 4:21 PMI thought there was something ready from tornadoofx
mariofelesdossantosjr
12/07/2020, 4:21 PMmelatonina
12/16/2020, 5:19 PM