@@ -17,10 +17,12 @@ import IconList from '~/components/icons/IconList.vue';
17
17
import { ListScrollItemType } from '~/models/list-scroll.model' ;
18
18
import { NotificationService } from '~/services/notification.service' ;
19
19
import { TraktService } from '~/services/trakt.service' ;
20
+ import { useActivityStore } from '~/stores/data/activity.store' ;
20
21
import { logger } from '~/stores/settings/log.store' ;
21
22
import { useUserSettingsStoreRefs } from '~/stores/settings/user.store' ;
22
23
import { useI18n } from '~/utils' ;
23
24
import { storage } from '~/utils/browser/browser-storage.utils' ;
25
+ import { debounce } from '~/utils/debounce.utils' ;
24
26
import { debounceLoading , useBelowThreshold , useLoadingPlaceholder , useSearchFilter } from '~/utils/store.utils' ;
25
27
import { clearProxy } from '~/utils/vue.utils' ;
26
28
@@ -314,6 +316,10 @@ export const useListStore = defineStore('data.list', () => {
314
316
315
317
const i18n = useI18n ( 'common' , 'notification' ) ;
316
318
319
+ const { fetchActivity } = useActivityStore ( ) ;
320
+
321
+ const updateActivity = debounce ( fetchActivity , 1000 ) ;
322
+
317
323
const addToOrRemoveFromList = async ( {
318
324
list,
319
325
itemType,
@@ -390,6 +396,7 @@ export const useListStore = defineStore('data.list', () => {
390
396
} finally {
391
397
typeItemLoading [ listType ] ! [ itemType ] ! [ itemIds . trakt . toString ( ) ] = false ;
392
398
typeLoading [ listType ] = false ;
399
+ updateActivity ( ) ;
393
400
}
394
401
} ;
395
402
0 commit comments