diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index 38fdbccab38..72855868559 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -370,10 +370,10 @@ protected void showStreamDialog(final StreamInfoItem item) { StreamDialogEntry.share )); } + entries.add(StreamDialogEntry.open_in_browser); if (KoreUtil.shouldShowPlayWithKodi(context, item.getServiceId())) { entries.add(StreamDialogEntry.play_with_kodi); } - if (!isNullOrEmpty(item.getUploaderUrl())) { entries.add(StreamDialogEntry.show_channel_details); } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 1ede515baff..0e36d18c702 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -161,6 +161,7 @@ protected void showStreamDialog(final StreamInfoItem item) { StreamDialogEntry.share )); } + entries.add(StreamDialogEntry.open_in_browser); if (KoreUtil.shouldShowPlayWithKodi(context, item.getServiceId())) { entries.add(StreamDialogEntry.play_with_kodi); } diff --git a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java index a6877a9a0dc..10aa8aa68df 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java @@ -358,6 +358,7 @@ private void showStreamDialog(final StreamStatisticsEntry item) { StreamDialogEntry.share )); } + entries.add(StreamDialogEntry.open_in_browser); if (KoreUtil.shouldShowPlayWithKodi(context, infoItem.getServiceId())) { entries.add(StreamDialogEntry.play_with_kodi); } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 4c2f80edc2e..f79282641cb 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -769,6 +769,7 @@ protected void showStreamItemDialog(final PlaylistStreamEntry item) { StreamDialogEntry.share )); } + entries.add(StreamDialogEntry.open_in_browser); if (KoreUtil.shouldShowPlayWithKodi(context, infoItem.getServiceId())) { entries.add(StreamDialogEntry.play_with_kodi); } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt index d3f80e214e6..13643af15fe 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt @@ -294,12 +294,14 @@ class SubscriptionFragment : BaseStateFragment() { } private fun showLongTapDialog(selectedItem: ChannelInfoItem) { - val commands = arrayOf(getString(R.string.share), getString(R.string.unsubscribe)) + val commands = arrayOf(getString(R.string.share), getString(R.string.open_in_browser), + getString(R.string.unsubscribe)) val actions = DialogInterface.OnClickListener { _, i -> when (i) { 0 -> ShareUtils.shareText(requireContext(), selectedItem.name, selectedItem.url) - 1 -> deleteChannel(selectedItem) + 1 -> ShareUtils.openUrlInBrowser(requireContext(), selectedItem.url) + 2 -> deleteChannel(selectedItem) } } diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index 2d59febc22e..b7629fac300 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -87,7 +87,10 @@ public enum StreamDialogEntry { }), share(R.string.share, (fragment, item) -> - ShareUtils.shareText(fragment.getContext(), item.getName(), item.getUrl())); + ShareUtils.shareText(fragment.getContext(), item.getName(), item.getUrl())), + + open_in_browser(R.string.open_in_browser, (fragment, item) -> + ShareUtils.openUrlInBrowser(fragment.getContext(), item.getUrl())); ///////////////