From a4bd82be8a3efc98dea2fe9e7c3913a9ca888db7 Mon Sep 17 00:00:00 2001 From: Kouki Badr <36043466+koukibadr@users.noreply.github.com> Date: Tue, 22 Jul 2025 04:28:56 +0100 Subject: [PATCH] fix: handle nullable nextPage behavior when searching albums #12401 (#12408) * fix: handle nullable nextPage behavior when searching albums #12401 * feat: add nullable annotation to newPage attribute in SearchFragment * Updated more usages of InfoItemsPage#getNextPage. Nullability is already handled in these areas so no other changes needed --------- Co-authored-by: Siddhesh Naik --- .../schabi/newpipe/fragments/list/BaseListInfoFragment.java | 2 ++ .../schabi/newpipe/fragments/list/search/SearchFragment.java | 3 ++- .../schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java index 61a361f23..7f594734a 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java @@ -8,6 +8,7 @@ import android.util.Log; import android.view.View; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.evernote.android.state.State; @@ -42,6 +43,7 @@ public abstract class BaseListInfoFragment menuItemToFilterName = new SparseArrayCompat<>(); private StreamingService service; + @Nullable private Page nextPage; private boolean showLocalSuggestions = true; private boolean showRemoteSuggestions = true; @@ -1090,7 +1091,7 @@ public class SearchFragment extends BaseListFragment> final int serviceId; final String baseUrl; + @Nullable Page nextPage; private transient Disposable fetchReactor;