mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-22 04:59:34 +01:00
Delay only if not empty
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
cd35b6eb24
commit
40d5dd469a
@ -66,7 +66,9 @@ class DebouncingTextWatcher(
|
|||||||
searchJob?.cancel()
|
searchJob?.cancel()
|
||||||
searchJob = coroutineScope.launch {
|
searchJob = coroutineScope.launch {
|
||||||
charSequence.let {
|
charSequence.let {
|
||||||
delay(debouncePeriod)
|
if (!charSequence.isNullOrEmpty()) {
|
||||||
|
delay(debouncePeriod)
|
||||||
|
}
|
||||||
onDebouncingTextWatcherChange(charSequence)
|
onDebouncingTextWatcherChange(charSequence)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user