release 0.4.0 #34

Merged
Seil0 merged 29 commits from develop into master 2021-03-04 20:38:30 +01:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 09191f6732 - Show all commits

View File

@ -55,7 +55,8 @@ class EpisodeItemAdapter(private val episodes: List<Episode>) : RecyclerView.Ada
}
fun updateWatchedState(watched: Boolean, position: Int) {
episodes[position].watched = watched
// use getOrNull as there could be a index out of bound when running this in onResume()
episodes.getOrNull(position)?.watched = watched
}
inner class EpisodeViewHolder(val binding: ItemEpisodeBinding) : RecyclerView.ViewHolder(binding.root) {