From e5e0b4a4bb1cdbe5713f3d584c0764dd6a66d77c Mon Sep 17 00:00:00 2001 From: Simayon Thampi Date: Thu, 28 Nov 2024 16:53:36 +0530 Subject: [PATCH] fix: episode progress tracking across seasons Fixes an issue where watching an episode would incorrectly mark all episodes with the same number across different seasons as watched. Now properly tracks progress by matching episode ID, season number, and episode number. --- .../player/controls/episodes/composables/EpisodeCard.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feature/mobile/player/src/main/java/com/flixclusive/feature/mobile/player/controls/episodes/composables/EpisodeCard.kt b/feature/mobile/player/src/main/java/com/flixclusive/feature/mobile/player/controls/episodes/composables/EpisodeCard.kt index e885bc67d..5f8b1ada0 100644 --- a/feature/mobile/player/src/main/java/com/flixclusive/feature/mobile/player/controls/episodes/composables/EpisodeCard.kt +++ b/feature/mobile/player/src/main/java/com/flixclusive/feature/mobile/player/controls/episodes/composables/EpisodeCard.kt @@ -69,7 +69,9 @@ internal fun EpisodeCard( val episodeProgress = watchHistoryItem .episodesWatched .find { - it.episodeId == data.id + it.episodeId == data.id && + it.seasonNumber == data.season && + it.episodeNumber == data.number } when {