Merge branch 'fix/remove-extra-notifications-fetch' into 'develop'

Fix: notifications fetcher double fetching on every tick

See merge request pleroma/pleroma-fe!1164
This commit is contained in:
Shpuld Shpludson 2020-07-05 07:03:27 +00:00
commit b761bcf333
4 changed files with 12 additions and 15 deletions

View file

@ -27,6 +27,11 @@ const Notifications = {
seenToDisplayCount: DEFAULT_SEEN_TO_DISPLAY_COUNT
}
},
created () {
const store = this.$store
const credentials = store.state.users.currentUser.credentials
notificationsFetcher.fetchAndUpdate({ store, credentials })
},
computed: {
mainClass () {
return this.minimalMode ? '' : 'panel panel-default'
@ -56,11 +61,6 @@ const Notifications = {
components: {
Notification
},
created () {
const { dispatch } = this.$store
dispatch('fetchAndUpdateNotifications')
},
watch: {
unseenCount (count) {
if (count > 0) {