aboutsummaryrefslogtreecommitdiff
path: root/src/services/timeline_fetcher
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-03-02 08:07:14 -0500
committertaehoon <th.dev91@gmail.com>2019-03-21 16:33:02 -0400
commit9857002bf5dc902302644e981712b611124a5845 (patch)
tree9205be4537246756d5973c84a53c737262c75bc2 /src/services/timeline_fetcher
parent300259fd976bb4496c5e1cca0df9bd47a1947259 (diff)
Add hideMutedPosts setting and wire up to post-returning endpoints
Diffstat (limited to 'src/services/timeline_fetcher')
-rw-r--r--src/services/timeline_fetcher/timeline_fetcher.service.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js
index 6f99616f..8e954cdf 100644
--- a/src/services/timeline_fetcher/timeline_fetcher.service.js
+++ b/src/services/timeline_fetcher/timeline_fetcher.service.js
@@ -19,6 +19,9 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false
const args = { timeline, credentials }
const rootState = store.rootState || store.state
const timelineData = rootState.statuses.timelines[camelCase(timeline)]
+ const hideMutedPosts = typeof rootState.config.hideMutedPosts === 'undefined'
+ ? rootState.instance.hideMutedPosts
+ : rootState.config.hideMutedPosts
if (older) {
args['until'] = until || timelineData.minId
@@ -28,6 +31,7 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false
args['userId'] = userId
args['tag'] = tag
+ args['withMuted'] = !hideMutedPosts
const numStatusesBeforeFetch = timelineData.statuses.length