fix article read after switching to article view

This commit is contained in:
2026-06-13 11:59:33 +02:00
parent fbf3597984
commit 82ec6ea902
+7
View File
@@ -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()