mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Update ResultFragmentTv.kt
This commit is contained in:
parent
fa1eb48922
commit
09321a3ab1
1 changed files with 1 additions and 1 deletions
|
@ -783,7 +783,7 @@ class ResultFragmentTv : Fragment() {
|
||||||
// resultEpisodeLoading.isVisible = episodes is Resource.Loading
|
// resultEpisodeLoading.isVisible = episodes is Resource.Loading
|
||||||
if (episodes is Resource.Success) {
|
if (episodes is Resource.Success) {
|
||||||
|
|
||||||
val lastWatchedIndex = episodes.value.indexOfLast { ep -> ep.getWatchProgress() >= (NEXT_WATCH_EPISODE_PERCENTAGE.toFloat() / 100.0f) }
|
val lastWatchedIndex = episodes.value.indexOfLast { ep -> ep.getWatchProgress() >= NEXT_WATCH_EPISODE_PERCENTAGE.toFloat() / 100.0f }
|
||||||
val firstUnwatched = episodes.value.getOrElse(lastWatchedIndex + 1) { episodes.value.firstOrNull() }
|
val firstUnwatched = episodes.value.getOrElse(lastWatchedIndex + 1) { episodes.value.firstOrNull() }
|
||||||
|
|
||||||
if (firstUnwatched != null) {
|
if (firstUnwatched != null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue