From 27f614d7c3e98cb0a49dada1cb33990b17193066 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Tue, 18 Jul 2017 20:05:41 +0200 Subject: [PATCH] fix bug where "no result" message was not shown in SearchActivity --- app/src/main/java/com/keylesspalace/tusky/SearchActivity.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java b/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java index 9fad5f05b..156baf02e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java @@ -37,8 +37,6 @@ import com.keylesspalace.tusky.adapter.SearchResultsAdapter; import com.keylesspalace.tusky.entity.SearchResults; import com.keylesspalace.tusky.interfaces.LinkListener; -import java.util.List; - import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; @@ -165,7 +163,7 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe public void onResponse(Call call, Response response) { if (response.isSuccessful()) { SearchResults results = response.body(); - if (results.accounts != null || results.hashtags != null) { + if (results.accounts != null && results.accounts.length > 0 || results.hashtags != null && results.hashtags.length > 0) { adapter.updateSearchResults(results); hideFeedback(); } else {