From 32a26951f73a8c88505ce57f4eaf72452bc055b7 Mon Sep 17 00:00:00 2001
From: tapframe <85391825+tapframe@users.noreply.github.com>
Date: Fri, 12 Jun 2026 20:07:28 +0530
Subject: [PATCH] Refresh watch progress when clearing CW cache
---
.../composeResources/values/strings.xml | 2 +-
.../com/nuvio/app/features/home/HomeScreen.kt | 11 ++++++-
.../features/settings/AdvancedSettingsPage.kt | 9 ++++++
.../ContinueWatchingEnrichmentCache.kt | 6 ++++
.../watchprogress/WatchProgressRepository.kt | 29 +++++++++++++++++++
5 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml
index be681d8d9..a79ad5e75 100644
--- a/composeApp/src/commonMain/composeResources/values/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values/strings.xml
@@ -449,7 +449,7 @@
Remember Last Profile
Remember last selected profile at startup
Clear Continue Watching Cache
- Remove cached thumbnails, titles, and enrichment data for Continue Watching
+ Remove cached Continue Watching data and refresh watch progress
Cache cleared
APP LICENSE
DATA & SERVICES
diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt
index 0d90dfad7..de8b49839 100644
--- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt
+++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt
@@ -281,11 +281,20 @@ fun HomeScreen(
}
val profileState by ProfileRepository.state.collectAsStateWithLifecycle()
val activeProfileId = profileState.activeProfile?.profileIndex ?: 1
+ val cwCacheClearVersion by ContinueWatchingEnrichmentCache.cacheCleared.collectAsStateWithLifecycle()
var nextUpItemsBySeries by remember(activeProfileId) { mutableStateOf