Several small fixes (#1612)

## Description
- Fixes showing "null" in the subtitle for some tv episodes (usually
daily shows like Jeopardy)
- Partially fix holding back to return to the previous grid position
(still has focus issues)
- Show/hide tabs on the discover page similar to other pages in the app
- Prevent a warning server-side if a negative playback timestamp is sent

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-06-22 18:38:19 -04:00 • committed by GitHub
parent 77d7571276
commit c945e1a472
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 44 additions and 18 deletions

View file

@ -12,6 +12,7 @@ import com.github.damontecres.wholphin.ui.detail.series.SeasonEpisodeIds
import com.github.damontecres.wholphin.ui.dot
import com.github.damontecres.wholphin.ui.formatDateTime
import com.github.damontecres.wholphin.ui.getDateFormatter
import com.github.damontecres.wholphin.ui.joinNotBlank
import com.github.damontecres.wholphin.ui.nav.Destination
import com.github.damontecres.wholphin.ui.playback.playable
import com.github.damontecres.wholphin.ui.roundMinutes
@ -57,14 +58,14 @@ data class BaseItem(
val title get() = if (type == BaseItemKind.EPISODE) data.seriesName else name
val subtitle
get() =
when (type) {
BaseItemKind.EPISODE -> data.seasonEpisode + " - " + name
BaseItemKind.SERIES -> data.seriesProductionYears
BaseItemKind.AUDIO -> listOfNotNull(data.album, artistsString).joinToString(" - ")
else -> data.productionYear?.toString()
}
val subtitle: String? by lazy {
when (type) {
BaseItemKind.EPISODE -> listOf(data.seasonEpisode, name).joinNotBlank(" - ")
BaseItemKind.SERIES -> data.seriesProductionYears
BaseItemKind.AUDIO -> listOf(data.album, artistsString).joinNotBlank(" - ")
else -> data.productionYear?.toString()
}
}
val subtitleLong: String? by lazy {
if (type == BaseItemKind.EPISODE) {
@ -72,7 +73,7 @@ data class BaseItem(
add(data.seasonEpisodePadded)
add(data.name)
add(data.premiereDate?.let { formatDateTime(it) })
}.filterNotNull().joinToString(" - ")
}.joinNotBlank(" - ")
} else {
data.productionYear?.toString()
}