1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-01-11 01:40:59 +00:00

Fix long press menu in feed

This commit is contained in:
Stypox 2021-06-09 16:15:04 +02:00
parent 4698d07323
commit 7145b117cc
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -309,7 +309,8 @@ class FeedFragment : BaseStateFragment<FeedState>() {
listOf( listOf(
StreamDialogEntry.start_here_on_background, StreamDialogEntry.start_here_on_background,
StreamDialogEntry.append_playlist, StreamDialogEntry.append_playlist,
StreamDialogEntry.share StreamDialogEntry.share,
StreamDialogEntry.open_in_browser
) )
) )
} else { } else {
@ -318,11 +319,13 @@ class FeedFragment : BaseStateFragment<FeedState>() {
StreamDialogEntry.start_here_on_background, StreamDialogEntry.start_here_on_background,
StreamDialogEntry.start_here_on_popup, StreamDialogEntry.start_here_on_popup,
StreamDialogEntry.append_playlist, StreamDialogEntry.append_playlist,
StreamDialogEntry.share StreamDialogEntry.share,
StreamDialogEntry.open_in_browser
) )
) )
} }
StreamDialogEntry.setEnabledEntries(entries)
InfoItemDialog(activity, item, StreamDialogEntry.getCommands(context)) { _, which -> InfoItemDialog(activity, item, StreamDialogEntry.getCommands(context)) { _, which ->
StreamDialogEntry.clickOn(which, this, item) StreamDialogEntry.clickOn(which, this, item)
}.show() }.show()
@ -400,7 +403,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
} }
private fun handleItemsErrors(errors: List<Throwable>) { private fun handleItemsErrors(errors: List<Throwable>) {
errors.forEachIndexed() { i, t -> errors.forEachIndexed { i, t ->
if (t is FeedLoadService.RequestException && if (t is FeedLoadService.RequestException &&
t.cause is ContentNotAvailableException t.cause is ContentNotAvailableException
) { ) {