mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-17 15:32:01 +00:00
Merge 5db7c9d356 into 70d3eee9d2
This commit is contained in:
commit
5ee0970194
2 changed files with 11 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
<string name="action_next">Next</string>
|
<string name="action_next">Next</string>
|
||||||
<string name="action_ok">OK</string>
|
<string name="action_ok">OK</string>
|
||||||
<string name="action_play">Play</string>
|
<string name="action_play">Play</string>
|
||||||
|
<string name="action_watch_again">Watch Again</string>
|
||||||
<string name="action_previous">Previous</string>
|
<string name="action_previous">Previous</string>
|
||||||
<string name="action_remove">Remove</string>
|
<string name="action_remove">Remove</string>
|
||||||
<string name="action_reorder">Reorder</string>
|
<string name="action_reorder">Reorder</string>
|
||||||
|
|
|
||||||
|
|
@ -434,12 +434,21 @@ fun MetaDetailsScreen(
|
||||||
}
|
}
|
||||||
val playText = stringResource(Res.string.action_play)
|
val playText = stringResource(Res.string.action_play)
|
||||||
val resumeText = stringResource(Res.string.action_resume)
|
val resumeText = stringResource(Res.string.action_resume)
|
||||||
val playButtonLabel = remember(movieProgress, seriesAction, meta.type, hasEpisodes, playText, resumeText) {
|
val watchAgainText = stringResource(Res.string.action_watch_again)
|
||||||
|
val isMovieWatched = remember(meta.id, meta.type, hasEpisodes, watchedUiState.watchedKeys) {
|
||||||
|
meta.type != "series" && !hasEpisodes && WatchedRepository.isWatched(
|
||||||
|
id = meta.id,
|
||||||
|
type = meta.type,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
val playButtonLabel = remember(movieProgress, isMovieWatched, seriesAction, meta.type, hasEpisodes, playText, resumeText, watchAgainText) {
|
||||||
when {
|
when {
|
||||||
(meta.type == "series" || hasEpisodes) && seriesAction != null ->
|
(meta.type == "series" || hasEpisodes) && seriesAction != null ->
|
||||||
seriesAction.label
|
seriesAction.label
|
||||||
meta.type != "series" && !hasEpisodes && movieProgress != null ->
|
meta.type != "series" && !hasEpisodes && movieProgress != null ->
|
||||||
resumeText
|
resumeText
|
||||||
|
isMovieWatched ->
|
||||||
|
watchAgainText
|
||||||
else -> playText
|
else -> playText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue