fix(watch): resolve watch state per item at cards and playback open

Cards consult the hierarchy-aware store so container marks flip episode
rows instantly and a stale per-episode patch can no longer shadow a newer
show/season mark; playback opens with the session-fresh resume offset.
This commit is contained in:
edde746
2026-06-10 05:23:09 +02:00
parent 516925cf50
commit 3753967caf
7 changed files with 257 additions and 11 deletions
+1 -3
View File
@@ -49,9 +49,7 @@ class PlaylistItemCard extends StatefulWidget {
class _PlaylistItemCardState extends State<PlaylistItemCard> with ContextMenuTapMixin<PlaylistItemCard> {
MediaItem _effectiveItem(BuildContext context) {
try {
final patch = context.select<WatchStateStore, WatchStatePatch?>(
(provider) => provider.patchForGlobalKey(widget.item.globalKey),
);
final patch = context.select<WatchStateStore, WatchStatePatch?>((store) => store.patchForItem(widget.item));
return WatchStateStore.applyPatch(widget.item, patch);
} on ProviderNotFoundException {
return widget.item;