Fix click/long click issues on some view more grid pages (#1486)

## Description
On a library recommended tab, if you clicked View More, clicking a card
on the grid would directly play the item instead of the regular
behavior.

This PR fixes that and simplifies the code required to support simple
context menus.

### Related issues
Fixes #1480

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-05-30 17:41:27 -04:00 • committed by GitHub
parent 7660c53e3a
commit 68836bb834
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 334 additions and 229 deletions

View file

@ -198,6 +198,10 @@ data class BaseItem(
*/
fun destination(index: Int? = null): Destination {
if (destinationOverride != null) return destinationOverride
if (data.extraType != null || type == BaseItemKind.TRAILER) {
// Extras including trailers should always play directly
return Destination.Playback(id, 0)
}
val result =
// Redirect episodes & seasons to their series if possible
when (type) {