mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +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,9 +66,11 @@ class DebouncingTextWatcher(
|
||||
searchJob?.cancel()
|
||||
searchJob = coroutineScope.launch {
|
||||
charSequence.let {
|
||||
delay(debouncePeriod)
|
||||
if (!charSequence.isNullOrEmpty()) {
|
||||
delay(debouncePeriod)
|
||||
}
|
||||
onDebouncingTextWatcherChange(charSequence)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user