diff --git a/src/components/FeedPage.vue b/src/components/FeedPage.vue index e6e5e4b8..cb339156 100644 --- a/src/components/FeedPage.vue +++ b/src/components/FeedPage.vue @@ -91,8 +91,14 @@ export default { this.loadMoreVideos(); } }, - onUpdateWatched() { - if (this.videos.length > 0) this.updateWatched(this.videos); + onUpdateWatched(urls = null) { + if (urls === null) { + if (this.videos.length > 0) this.updateWatched(this.videos); + return; + } + + const subset = this.videos.filter(({ url }) => urls.includes(url)); + if (subset.length > 0) this.updateWatched(subset); }, }, }; diff --git a/src/components/VideoItem.vue b/src/components/VideoItem.vue index ed4e5383..cf05f554 100644 --- a/src/components/VideoItem.vue +++ b/src/components/VideoItem.vue @@ -206,7 +206,7 @@ export default { if (this.video.watched) { let request = store.delete(videoId); request.onsuccess = function () { - instance.$emit("update:watched"); + instance.$emit("update:watched", [instance.video.url]); }; return; } @@ -233,7 +233,7 @@ export default { // Save store.put(video); // Disappear if hideWatched is on - instance.$emit("update:watched"); + instance.$emit("update:watched", [instance.video.url]); instance.shouldShowVideo(); }; }