Debouncer

class Debouncer(debounceMs: Long)

Deprecated

Use the one from stream-chat-android-core

Replace with

import io.getstream.chat.android.core.utils.Debouncer
Debouncer(debounceMs)

Utility class for debouncing high frequency events.

submitting a new piece of work to run within the debounce window will cancel the previously submitted pending work.

Constructors

Link copied to clipboard
constructor(debounceMs: Long)

Functions

Link copied to clipboard

Cancels the current work without shutting down the Coroutine scope.

Link copied to clipboard
fun shutdown()

Cleans up any pending work.

Link copied to clipboard
fun submit(work: () -> Unit)

Cancels the previous work and launches a new coroutine containing the new work.

Link copied to clipboard
fun submitSuspendable(work: suspend () -> Unit)

Cancels the previous work and launches a new coroutine containing the new suspendable work.