Fix debouncing not working on first search character

Should partially address #1729 and #769.

Signed-off-by: Robbie Cooper <cooperra@users.noreply.github.com>
This commit is contained in:
Robbie Cooper 2024-08-27 19:08:57 -04:00 committed by GitHub
parent 2d6b4fa7bc
commit 869b2cc5c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -228,8 +228,7 @@ public abstract class SearchableBaseNoteFragment extends BaseNoteFragment {
handler.removeCallbacksAndMessages(null);
}
delayQueryTask = new DelayQueryRunnable(newText);
// If there is only one char in the search pattern, we should start the search immediately.
handler.postDelayed(delayQueryTask, newText.length() > 1 ? delay : 0);
handler.postDelayed(delayQueryTask, delay);
}
class DelayQueryRunnable implements Runnable {