fix: bootstrap digest store on app mount for correct badge count on load
This commit is contained in:
parent
5621140a72
commit
51f5b3f0a0
1 changed files with 3 additions and 0 deletions
|
|
@ -17,14 +17,17 @@ import { RouterView } from 'vue-router'
|
|||
import { useMotion } from './composables/useMotion'
|
||||
import { useHackerMode, useKonamiCode } from './composables/useEasterEgg'
|
||||
import AppNav from './components/AppNav.vue'
|
||||
import { useDigestStore } from './stores/digest'
|
||||
|
||||
const motion = useMotion()
|
||||
const { toggle, restore } = useHackerMode()
|
||||
const digestStore = useDigestStore()
|
||||
|
||||
useKonamiCode(toggle)
|
||||
|
||||
onMounted(() => {
|
||||
restore() // re-apply hacker mode from localStorage on hard reload
|
||||
digestStore.fetchAll() // populate badge immediately, before user visits Digest tab
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue