From 87e7d959668d5f4f6dacb49be5ea06ee4eb64b92 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 17 Mar 2021 21:36:02 +0100 Subject: [PATCH] Do not show suggestions error snackbar for interrupted I/O Fix formatting --- .../newpipe/fragments/list/search/SearchFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 8b596e3a8..5ff2f4788 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -55,6 +55,7 @@ import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQu import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.list.BaseListFragment; import org.schabi.newpipe.ktx.AnimationType; +import org.schabi.newpipe.ktx.ExceptionUtils; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.settings.NewPipeSettings; import org.schabi.newpipe.util.Constants; @@ -782,7 +783,8 @@ public class SearchFragment extends BaseListFragment= THRESHOLD_NETWORK_SUGGESTION; if (showLocalSuggestions && shallShowRemoteSuggestionsNow) { - return Observable.zip(getLocalSuggestionsObservable(query, 3), + return Observable.zip( + getLocalSuggestionsObservable(query, 3), getRemoteSuggestionsObservable(query), (local, remote) -> { remote.removeIf(remoteItem -> local.stream().anyMatch( @@ -810,8 +812,10 @@ public class SearchFragment extends BaseListFragment