Fix article get read when navigation to admin area.
This commit is contained in:
Generated
+1
-1
@@ -2550,7 +2550,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rss-reader"
|
name = "rss-reader"
|
||||||
version = "0.1.0"
|
version = "0.9.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-cors",
|
"actix-cors",
|
||||||
"actix-governor",
|
"actix-governor",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, computed, nextTick, watch } from 'vue';
|
import { onMounted, onBeforeUnmount, computed, nextTick, watch } from 'vue';
|
||||||
import { useFeeds } from '@/composables/useFeeds';
|
import { useFeeds } from '@/composables/useFeeds';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -14,6 +14,7 @@ const {
|
|||||||
fetchData,
|
fetchData,
|
||||||
sync,
|
sync,
|
||||||
getReadable,
|
getReadable,
|
||||||
|
disconnectObserver,
|
||||||
setInitialLoad,
|
setInitialLoad,
|
||||||
showMessageForXSeconds,
|
showMessageForXSeconds,
|
||||||
} = useFeeds()
|
} = useFeeds()
|
||||||
@@ -74,6 +75,11 @@ async function shareUrl(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
disconnectObserver()
|
||||||
|
setInitialLoad(false)
|
||||||
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
setInitialLoad(false)
|
setInitialLoad(false)
|
||||||
await fetchData()
|
await fetchData()
|
||||||
|
|||||||
@@ -268,6 +268,13 @@ function handleIntersection(entries, topbarHeight = 0) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disconnectObserver() {
|
||||||
|
if (observer) {
|
||||||
|
observer.disconnect()
|
||||||
|
observer = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setInitialLoad(value) {
|
function setInitialLoad(value) {
|
||||||
initialLoad = value
|
initialLoad = value
|
||||||
}
|
}
|
||||||
@@ -375,6 +382,7 @@ export function useFeeds() {
|
|||||||
markAllRead,
|
markAllRead,
|
||||||
showMessageForXSeconds,
|
showMessageForXSeconds,
|
||||||
setupIntersectionObserver,
|
setupIntersectionObserver,
|
||||||
|
disconnectObserver,
|
||||||
setInitialLoad,
|
setInitialLoad,
|
||||||
handleIntersection,
|
handleIntersection,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user