Skip to content

Commit

Permalink
fix mark previous episodes as seen
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 committed Jun 15, 2021
1 parent 419b5ab commit c528251
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ class AnimeController :

private fun markPreviousAsRead(episodes: List<EpisodeItem>) {
val adapter = episodesAdapter ?: return
val prevEpisodes = if (presenter.sortDescending()) adapter.items else adapter.items.reversed()
val prevEpisodes = if (presenter.sortDescending()) adapter.items.reversed() else adapter.items
val episodePos = prevEpisodes.indexOf(episodes.lastOrNull())
if (episodePos != -1) {
markAsRead(prevEpisodes.take(episodePos))
Expand Down

0 comments on commit c528251

Please sign in to comment.