fix scroll to mark read bug
This commit is contained in:
@@ -199,13 +199,18 @@ function markCurrentArticleRead() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function leaveArticleView() {
|
async function leaveArticleView() {
|
||||||
// Articles paged past in article view were marked read but deliberately kept
|
// 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
|
// in place so currentIndex stayed valid — drop them now so they don't keep
|
||||||
// showing up in the list view.
|
// showing up in the list view.
|
||||||
feeds.value = feeds.value.filter(feed => !feed.read)
|
feeds.value = feeds.value.filter(feed => !feed.read)
|
||||||
currentIndex.value = 0
|
currentIndex.value = 0
|
||||||
viewMode.value = 'list'
|
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() {
|
function toggleViewMode() {
|
||||||
|
|||||||
Reference in New Issue
Block a user