From 869b2cc5c7ef31724a15afc6278e9d977f7dabd6 Mon Sep 17 00:00:00 2001 From: Robbie Cooper Date: Tue, 27 Aug 2024 19:08:57 -0400 Subject: [PATCH] Fix debouncing not working on first search character Should partially address #1729 and #769. Signed-off-by: Robbie Cooper --- .../owncloud/notes/edit/SearchableBaseNoteFragment.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java index 12d0cf2d..6814e4c0 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java @@ -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 {