Skip to content

Commit 4ca5569

Browse files
committed
Address Isira review comment
1 parent c6412e8 commit 4ca5569

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

app/src/main/java/org/schabi/newpipe/ui/components/menu/LongPressAction.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ data class LongPressAction(
309309
): List<LongPressAction> {
310310
return buildPlayerActionList { ChannelTabPlayQueue(item.serviceId, item.url) } +
311311
buildShareActionList(item) +
312-
listOf(
312+
listOfNotNull(
313313
Type.ShowChannelDetails.buildAction { context ->
314314
NavigationHelper.openChannelFragment(
315315
context.findFragmentActivity().supportFragmentManager,
@@ -318,14 +318,8 @@ data class LongPressAction(
318318
item.name,
319319
)
320320
},
321-
) +
322-
(
323-
onUnsubscribe
324-
?.let { onUnsubscribe ->
325-
listOf(Type.Unsubscribe.buildAction { onUnsubscribe.run() })
326-
}
327-
?: listOf()
328-
)
321+
onUnsubscribe?.let { r -> Type.Unsubscribe.buildAction { r.run() } }
322+
)
329323
}
330324

331325
@JvmStatic

0 commit comments

Comments
 (0)