aboutsummaryrefslogtreecommitdiff
path: root/src/services/notifications_fetcher/notifications_fetcher.service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/notifications_fetcher/notifications_fetcher.service.js')
-rw-r--r--src/services/notifications_fetcher/notifications_fetcher.service.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js
index 60c497ae..47008026 100644
--- a/src/services/notifications_fetcher/notifications_fetcher.service.js
+++ b/src/services/notifications_fetcher/notifications_fetcher.service.js
@@ -1,15 +1,19 @@
import apiService from '../api/api.service.js'
-const update = ({store, notifications, older}) => {
+const update = ({ store, notifications, older }) => {
store.dispatch('setNotificationsError', { value: false })
store.dispatch('addNewNotifications', { notifications, older })
}
-const fetchAndUpdate = ({store, credentials, older = false}) => {
+const fetchAndUpdate = ({ store, credentials, older = false }) => {
const args = { credentials }
+ const { getters } = store
const rootState = store.rootState || store.state
const timelineData = rootState.statuses.notifications
+ const hideMutedPosts = getters.mergedConfig.hideMutedPosts
+
+ args['withMuted'] = !hideMutedPosts
args['timeline'] = 'notifications'
if (older) {
@@ -45,7 +49,7 @@ const fetchNotifications = ({ store, args, older }) => {
.catch(() => store.dispatch('setNotificationsError', { value: true }))
}
-const startFetching = ({credentials, store}) => {
+const startFetching = ({ credentials, store }) => {
fetchAndUpdate({ credentials, store })
const boundFetchAndUpdate = () => fetchAndUpdate({ credentials, store })
// Initially there's set flag to silence all desktop notifications so