Move announcements module to store
This commit is contained in:
parent
e3ca5b0a32
commit
f9254e5fb7
13 changed files with 160 additions and 153 deletions
|
|
@ -5,6 +5,7 @@ import { unseenNotificationsFromStore } from '../../services/notification_utils/
|
|||
import GestureService from '../../services/gesture_service/gesture_service'
|
||||
import NavigationPins from 'src/components/navigation/navigation_pins.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { mapState } from 'pinia'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faTimes,
|
||||
|
|
@ -13,6 +14,7 @@ import {
|
|||
faArrowUp,
|
||||
faMinus
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { useAnnouncementsStore } from '../../stores/announcements'
|
||||
|
||||
library.add(
|
||||
faTimes,
|
||||
|
|
@ -57,7 +59,8 @@ const MobileNav = {
|
|||
isChat () {
|
||||
return this.$route.name === 'chat'
|
||||
},
|
||||
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount']),
|
||||
...mapState(useAnnouncementsStore, ['unreadAnnouncementCount']),
|
||||
...mapGetters(['unreadChatCount']),
|
||||
chatsPinned () {
|
||||
return new Set(this.$store.state.serverSideStorage.prefsStorage.collections.pinnedNavItems).has('chats')
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue