diff --git a/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java b/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java
index ef24937fe..fcad0b612 100644
--- a/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java
+++ b/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java
@@ -18,6 +18,9 @@ import org.schabi.newpipe.util.NavigationHelper;
import java.util.Collections;
public final class QueueItemMenuUtil {
+ private QueueItemMenuUtil() {
+ }
+
public static void openPopupMenu(final PlayQueue playQueue,
final PlayQueueItem item,
final View view,
@@ -57,6 +60,13 @@ public final class QueueItemMenuUtil {
);
return true;
+ case R.id.menu_item_channel_details:
+ // An intent must be used here.
+ // Opening with FragmentManager transactions is not working,
+ // as PlayQueueActivity doesn't use fragments.
+ NavigationHelper.openChannelFragmentUsingIntent(context, item.getServiceId(),
+ item.getUploaderUrl(), item.getUploader());
+ return true;
case R.id.menu_item_share:
shareText(context, item.getTitle(), item.getUrl(),
item.getThumbnailUrl());
@@ -67,6 +77,4 @@ public final class QueueItemMenuUtil {
popupMenu.show();
}
-
- private QueueItemMenuUtil() { }
}
diff --git a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
index de0898e27..1c94743d0 100644
--- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
+++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
@@ -495,6 +495,27 @@ public final class NavigationHelper {
context.startActivity(intent);
}
+ /**
+ * Opens {@link ChannelFragment}.
+ * Use this instead of {@link #openChannelFragment(FragmentManager, int, String, String)}
+ * when no fragments are used / no FragmentManager is available.
+ * @param context
+ * @param serviceId
+ * @param url
+ * @param title
+ */
+ public static void openChannelFragmentUsingIntent(final Context context,
+ final int serviceId,
+ final String url,
+ @NonNull final String title) {
+ final Intent intent = getOpenIntent(context, url, serviceId,
+ StreamingService.LinkType.CHANNEL);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.putExtra(Constants.KEY_TITLE, title);
+
+ context.startActivity(intent);
+ }
+
public static void openMainActivity(final Context context) {
final Intent mIntent = new Intent(context, MainActivity.class);
mIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
diff --git a/app/src/main/res/menu/menu_play_queue_item.xml b/app/src/main/res/menu/menu_play_queue_item.xml
index be5513708..b23f8008f 100644
--- a/app/src/main/res/menu/menu_play_queue_item.xml
+++ b/app/src/main/res/menu/menu_play_queue_item.xml
@@ -10,6 +10,9 @@
+