From 7145b117cccbf286de8006b4559e4fdd5dd1599b Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 9 Jun 2021 16:15:04 +0200 Subject: [PATCH] Fix long press menu in feed --- .../java/org/schabi/newpipe/local/feed/FeedFragment.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index 4665ebb7f..bafe8b0f2 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -309,7 +309,8 @@ class FeedFragment : BaseStateFragment() { listOf( StreamDialogEntry.start_here_on_background, StreamDialogEntry.append_playlist, - StreamDialogEntry.share + StreamDialogEntry.share, + StreamDialogEntry.open_in_browser ) ) } else { @@ -318,11 +319,13 @@ class FeedFragment : BaseStateFragment() { StreamDialogEntry.start_here_on_background, StreamDialogEntry.start_here_on_popup, StreamDialogEntry.append_playlist, - StreamDialogEntry.share + StreamDialogEntry.share, + StreamDialogEntry.open_in_browser ) ) } + StreamDialogEntry.setEnabledEntries(entries) InfoItemDialog(activity, item, StreamDialogEntry.getCommands(context)) { _, which -> StreamDialogEntry.clickOn(which, this, item) }.show() @@ -400,7 +403,7 @@ class FeedFragment : BaseStateFragment() { } private fun handleItemsErrors(errors: List) { - errors.forEachIndexed() { i, t -> + errors.forEachIndexed { i, t -> if (t is FeedLoadService.RequestException && t.cause is ContentNotAvailableException ) {