From 82ec6ea902382a74bad5ee7b8acd8ebc6a21eaea Mon Sep 17 00:00:00 2001 From: mace Date: Sat, 13 Jun 2026 11:59:33 +0200 Subject: [PATCH] fix article read after switching to article view --- vue/src/composables/useFeeds.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vue/src/composables/useFeeds.js b/vue/src/composables/useFeeds.js index 2801020..6fbc3b4 100644 --- a/vue/src/composables/useFeeds.js +++ b/vue/src/composables/useFeeds.js @@ -267,6 +267,13 @@ function toggleViewMode() { if (viewMode.value === 'article') { leaveArticleView() } else { + // Disconnect first: the v-if switch is about to unmount all .observe + // elements, which would otherwise fire intersection callbacks reporting + // them as no-longer-intersecting and mark every visible article read. + if (observer) { + observer.disconnect() + observer = null + } viewMode.value = 'article' currentIndex.value = 0 markCurrentArticleRead()