Add error logging for watch progress data corruption

- Added Android Log error logging in parseProgressMap() catch block
- Logs exceptions when JSON parsing fails to help diagnose data issues
- Prevents silent data loss without notification
- Uses "WatchProgressPrefs" tag for easy filtering in logcat

This will help identify and diagnose watch progress data corruption
issues that were previously failing silently.
This commit is contained in:
CrissZollo 2026-02-01 23:29:12 +01:00
parent a2cc1c0b69
commit dbf45f982f

View file

@ -179,6 +179,7 @@ class WatchProgressPreferences @Inject constructor(
val type = object : TypeToken<Map<String, WatchProgress>>() {}.type
gson.fromJson(json, type) ?: emptyMap()
} catch (e: Exception) {
android.util.Log.e("WatchProgressPrefs", "Failed to parse progress data", e)
emptyMap()
}
}