From 8b5617485652aab518dc144a420f7e90067e3017 Mon Sep 17 00:00:00 2001 From: mace Date: Tue, 9 Jun 2026 21:30:26 +0200 Subject: [PATCH] fix scroll to mark read bug --- vue/src/composables/useFeeds.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vue/src/composables/useFeeds.js b/vue/src/composables/useFeeds.js index d9734c1..f662d07 100644 --- a/vue/src/composables/useFeeds.js +++ b/vue/src/composables/useFeeds.js @@ -199,13 +199,18 @@ function markCurrentArticleRead() { } } -function leaveArticleView() { +async function leaveArticleView() { // Articles paged past in article view were marked read but deliberately kept // in place so currentIndex stayed valid — drop them now so they don't keep // showing up in the list view. feeds.value = feeds.value.filter(feed => !feed.read) currentIndex.value = 0 viewMode.value = 'list' + // The v-if on the list container tears down and recreates all .observe DOM + // nodes when switching views, so the intersection observer must be + // re-pointed at the new elements after Vue has finished rendering. + await nextTick() + setupIntersectionObserver() } function toggleViewMode() {