@@ -11,7 +11,7 @@ import {
11
11
type PopoverProps ,
12
12
} from ' naive-ui' ;
13
13
14
- import { computed , defineProps , type PropType , ref , toRefs } from ' vue' ;
14
+ import { computed , defineProps , type PropType , ref , toRefs , watch } from ' vue' ;
15
15
16
16
import PosterPlaceholder from ' ~/assets/images/poster-placholder.webp' ;
17
17
import AnchorLink from ' ~/components/common/buttons/AnchorLink.vue' ;
@@ -25,6 +25,7 @@ import { type ListScrollItem } from '~/models/list-scroll.model';
25
25
26
26
import { ProgressType } from ' ~/models/progress-type.model' ;
27
27
import { useItemCollected , useItemPlayed } from ' ~/stores/composable/use-item-played' ;
28
+ import { useShowStore } from ' ~/stores/data/show.store' ;
28
29
import { useWatchingStore } from ' ~/stores/data/watching.store' ;
29
30
import { useExtensionSettingsStoreRefs } from ' ~/stores/settings/extension.store' ;
30
31
import { useLinksStore } from ' ~/stores/settings/links.store' ;
@@ -126,6 +127,24 @@ const {
126
127
} = useItemPlayed (item , { showPlayed , showProgress });
127
128
const { collected, date : collectedDate } = useItemCollected (item , showCollected );
128
129
130
+ const { fetchShowProgress } = useShowStore ();
131
+
132
+ if (showProgress .value ) {
133
+ watch (
134
+ item ,
135
+ () => {
136
+ if (! showProgress .value ) return ;
137
+ if (! item ?.value ?.getProgressQuery ) return ;
138
+ const { id, cacheOptions } = item .value ?.getProgressQuery () ?? {};
139
+ if (! id ) return ;
140
+ return fetchShowProgress (id .toString (), cacheOptions );
141
+ },
142
+ {
143
+ immediate: true ,
144
+ },
145
+ );
146
+ }
147
+
129
148
const { isWatchingListItem } = useWatchingStore ();
130
149
const watching = computed (() => {
131
150
if (! showWatching .value ) return false ;
0 commit comments