diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-07-05 07:03:27 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-07-05 07:03:27 +0000 |
| commit | b761bcf3334e1f464e63a87de40eb75d0906d545 (patch) | |
| tree | 8cff14d0808e425a43d8fb424d4c49dc6574b99b /src/components/notifications | |
| parent | af4a26b5882807d834c8fcfdf5d10121f63d18d5 (diff) | |
| parent | 9178908c1ea8d0ad99b4a631abb9594edc3765bf (diff) | |
Merge branch 'fix/remove-extra-notifications-fetch' into 'develop'
Fix: notifications fetcher double fetching on every tick
See merge request pleroma/pleroma-fe!1164
Diffstat (limited to 'src/components/notifications')
| -rw-r--r-- | src/components/notifications/notifications.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 26ffbab6..d8a327b0 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -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) { |
