Debouncer

class Debouncer(delayMillis: Long)

Simple helper class for debouncing main thread requests. All actions are executed using Dispatchers.Main.

Constructors

Link copied to clipboard
fun Debouncer(delayMillis: Long)

Functions

Link copied to clipboard
fun cancel()

Cancels the currently running action.

Link copied to clipboard
fun debounce(action: () -> Unit)

Takes an action that should be "debounced"