From 748c2babe9c34e533ed7fe97693d284f5d752fd1 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Wed, 20 Sep 2023 15:41:21 +0200 Subject: [PATCH] Add comments and annotations --- .../newpipe/fragments/list/search/SearchFragment.java | 6 ++++++ .../schabi/newpipe/player/playqueue/SinglePlayQueue.java | 8 ++++++-- 2 files changed, 12 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 26a283229..4bae6f1ca 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 @@ -167,6 +167,10 @@ public class SearchFragment extends BaseListFragment items, final int index) { + public SinglePlayQueue(@NonNull final List items, final int index) { super(index, playQueueItemsOf(items)); } - private static List playQueueItemsOf(final List items) { + private static List playQueueItemsOf(@NonNull final List items) { final List playQueueItems = new ArrayList<>(items.size()); for (final StreamInfoItem item : items) { playQueueItems.add(new PlayQueueItem(item)); @@ -39,5 +41,7 @@ public final class SinglePlayQueue extends PlayQueue { @Override public void fetch() { + // Item was already passed in constructor. + // No further items need to be fetched as this is a PlayQueue with only one item } }