From 82fac1d4e7149e3d52e2f32670d6c07326ca842a Mon Sep 17 00:00:00 2001 From: FineFindus <63370021+FineFindus@users.noreply.github.com> Date: Fri, 17 Mar 2023 16:19:38 +0100 Subject: [PATCH] fix(search): check for empty queries Fixes an error message, which would appear, if the search query was blank. --- .../joinmastodon/android/fragments/discover/SearchFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchFragment.java index 7f7cc3e2a..e0ed682e2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchFragment.java @@ -236,7 +236,7 @@ public class SearchFragment extends BaseStatusListFragment{ } public void setQuery(String q){ - if(Objects.equals(q, currentQuery)) + if(Objects.equals(q, currentQuery) || q.isBlank()) return; if(currentRequest!=null){ currentRequest.cancel();