diff --git a/open-isle-cli/src/components/MenuComponent.vue b/open-isle-cli/src/components/MenuComponent.vue index d6bf2b8e4..fd3ca8af7 100644 --- a/open-isle-cli/src/components/MenuComponent.vue +++ b/open-isle-cli/src/components/MenuComponent.vue @@ -167,7 +167,7 @@ export default { notificationState.unreadCount = 0 } } - await updateCount() + watch(() => authState.loggedIn, async () => { await updateCount() }) @@ -189,6 +189,9 @@ export default { } catch { /* ignore */ } } + this.isLoadingCategory = !cachedCategories + this.isLoadingTag = !cachedTags + const fetchCategories = () => { fetch(`${API_BASE_URL}/api/categories`).then(res => { if (res.ok) { @@ -213,9 +216,6 @@ export default { }) } - this.isLoadingCategory = !cachedCategories - this.isLoadingTag = !cachedTags - if (cachedCategories) { setTimeout(fetchCategories, 1500) } else { @@ -227,6 +227,8 @@ export default { } else { fetchTags() } + + await updateCount() }, methods: { cycleTheme,