From 66a34b7ecf65ded39882b9e4e7df9bbd2067afc3 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 4 Sep 2019 12:19:39 +0300 Subject: [PATCH 1/3] Properly detect thread-muted posts and set `with_muted` when fetching notifications --- src/components/status/status.js | 2 +- .../notifications_fetcher/notifications_fetcher.service.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index 502d9583..d037f150 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -117,7 +117,7 @@ const Status = { return hits }, - muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) }, + muted () { return !this.unmuted && (this.status.muted || this.muteWordHits.length > 0) }, hideFilteredStatuses () { return typeof this.$store.state.config.hideFilteredStatuses === 'undefined' ? this.$store.state.instance.hideFilteredStatuses diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js index f9ec3f6e..b6c4cf80 100644 --- a/src/services/notifications_fetcher/notifications_fetcher.service.js +++ b/src/services/notifications_fetcher/notifications_fetcher.service.js @@ -10,6 +10,11 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => { const args = { credentials } const rootState = store.rootState || store.state const timelineData = rootState.statuses.notifications + const hideMutedPosts = typeof rootState.config.hideMutedPosts === 'undefined' + ? rootState.instance.hideMutedPosts + : rootState.config.hideMutedPosts + + args['withMuted'] = !hideMutedPosts args['timeline'] = 'notifications' if (older) { From 1a5a7bbebf45e93dbd47a99bb4eb05a5be5979f1 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 4 Sep 2019 21:11:13 +0300 Subject: [PATCH 2/3] Set thread_muted for all statuses with the same conversation id on status mute/unmute --- src/components/extra_buttons/extra_buttons.vue | 4 ++-- src/components/status/status.js | 2 +- src/modules/statuses.js | 10 ++++++---- .../entity_normalizer/entity_normalizer.service.js | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index ed0f3aa4..6781a4f8 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -10,14 +10,14 @@