1 parent 40b5fc2 commit 5677189Copy full SHA for 5677189
1 file changed
app/src/main/java/com/lamndt/smartmovie/EntityDetailScreen.kt
@@ -264,7 +264,7 @@ private fun SeasonContent(
264
}
265
}) { Text(stringResource(if (seasonWatched) R.string.mark_season_unwatched else R.string.mark_season_watched)) }
266
if (!seasonWatched) {
267
- val next = value.episodes.firstOrNull { it.episodeNumber !in watched }
+ val next = value.episodes.sortedBy { it.episodeNumber }.firstOrNull { it.episodeNumber !in watched }
268
next?.let { episode ->
269
OutlinedButton(onClick = { onEntity(CatalogEntity.Episode(episode)) }) {
270
Text(stringResource(R.string.continue_with_episode))
0 commit comments