From 7d28ac96e2eb528d7b18f98565f4ad1d2002de3b Mon Sep 17 00:00:00 2001 From: "Yevhen Babiichuk (DustDFG)" Date: Wed, 14 Jan 2026 17:05:38 +0200 Subject: [PATCH] Fix bug of search history randomly not saved Don't create disposable from operation of storing search to history because as we certainly want this to complete. Disposable was created in `search` method and then alsmost immediately was called `startLoading` which disposed "all" disposables including our operation of search storing (if was unlucky enough to not finish before this moment) --- .../schabi/newpipe/fragments/list/search/SearchFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 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 8cb5f6497..d662e4c74 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 @@ -865,14 +865,15 @@ public class SearchFragment extends BaseListFragment { }, throwable -> showSnackBarError(new ErrorInfo(throwable, UserAction.SEARCHED, theSearchString, serviceId)) - )); + ); // load search results suggestionPublisher.onNext(theSearchString);