Skip to content

Commit b2b9938

Browse files
committed
Put show channel details option in more long-press menus
1 parent 9595733 commit b2b9938

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import io.reactivex.rxjava3.disposables.CompositeDisposable;
6060
import io.reactivex.rxjava3.disposables.Disposable;
6161

62+
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
6263
import static org.schabi.newpipe.ktx.ViewUtils.animate;
6364
import static org.schabi.newpipe.ktx.ViewUtils.animateHideRecyclerViewAllowingScrolling;
6465

@@ -163,6 +164,11 @@ protected void showStreamDialog(final StreamInfoItem item) {
163164
if (KoreUtil.shouldShowPlayWithKodi(context, item.getServiceId())) {
164165
entries.add(StreamDialogEntry.play_with_kodi);
165166
}
167+
168+
if (!isNullOrEmpty(item.getUploaderUrl())) {
169+
entries.add(StreamDialogEntry.show_channel_details);
170+
}
171+
166172
StreamDialogEntry.setEnabledEntries(entries);
167173

168174
StreamDialogEntry.start_here_on_background.setCustomAction((fragment, infoItem) ->

app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
import io.reactivex.rxjava3.disposables.CompositeDisposable;
5454
import io.reactivex.rxjava3.disposables.Disposable;
5555

56+
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
57+
5658
public class StatisticsPlaylistFragment
5759
extends BaseLocalListFragment<List<StreamStatisticsEntry>, Void> {
5860
private final CompositeDisposable disposables = new CompositeDisposable();
@@ -359,6 +361,11 @@ private void showStreamDialog(final StreamStatisticsEntry item) {
359361
if (KoreUtil.shouldShowPlayWithKodi(context, infoItem.getServiceId())) {
360362
entries.add(StreamDialogEntry.play_with_kodi);
361363
}
364+
365+
if (!isNullOrEmpty(infoItem.getUploaderUrl())) {
366+
entries.add(StreamDialogEntry.show_channel_details);
367+
}
368+
362369
StreamDialogEntry.setEnabledEntries(entries);
363370

364371
StreamDialogEntry.start_here_on_background.setCustomAction((fragment, infoItemDuplicate) ->

app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import io.reactivex.rxjava3.schedulers.Schedulers;
6767
import io.reactivex.rxjava3.subjects.PublishSubject;
6868

69+
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
6970
import static org.schabi.newpipe.ktx.ViewUtils.animate;
7071

7172
public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistStreamEntry>, Void> {
@@ -771,6 +772,11 @@ protected void showStreamItemDialog(final PlaylistStreamEntry item) {
771772
if (KoreUtil.shouldShowPlayWithKodi(context, infoItem.getServiceId())) {
772773
entries.add(StreamDialogEntry.play_with_kodi);
773774
}
775+
776+
if (!isNullOrEmpty(infoItem.getUploaderUrl())) {
777+
entries.add(StreamDialogEntry.show_channel_details);
778+
}
779+
774780
StreamDialogEntry.setEnabledEntries(entries);
775781

776782
StreamDialogEntry.start_here_on_background.setCustomAction((fragment, infoItemDuplicate) ->

0 commit comments

Comments
 (0)