diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index cdb35e08..5d6bc4e4 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -23,6 +23,7 @@ const Timeline = { 'userId', 'listId', 'tag', + 'fetchParams', 'embedded', 'count', 'pinnedStatusIds', @@ -181,7 +182,8 @@ const Timeline = { showImmediately: true, userId: this.userId, listId: this.listId, - tag: this.tag + tag: this.tag, + params: this.fetchParams, }).then(({ statuses }) => { if (statuses && statuses.length === 0) { this.bottomedOut = true diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 1c457099..417316ed 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -93,6 +93,19 @@ const UserProfile = { hasPinned () { return !!(this.user.pinnedStatusIds || []).length }, + fetchParams () { + if (this.tab !== 'statuses') { + return [] + } + const params = [] + if (!this.filterParams.showReplies) { + params.push(['exclude_replies', 1]) + } + if (!this.filterParams.showRepeats) { + params.push(['exclude_reblogs', 1]) + } + return params + }, favorites () { return this.$store.state.statuses.timelines.favorites }, @@ -136,17 +149,7 @@ const UserProfile = { if (this.isUs) timelineTabMap['favorites'] = 'favorites' const timeline = timelineTabMap[nextTab] - const fetchArgs = { timeline: timeline, userId: this.userId } - if (timeline === 'user') { - const params = [] - if (!this.filterParams.showReplies) { - params.push(['exclude_replies', 1]) - } - if (!this.filterParams.showRepeats) { - params.push(['exclude_reblogs', 1]) - } - fetchArgs.params = params - } + const fetchArgs = { timeline: timeline, userId: this.userId, params: this.fetchParams } if (timeline) { this.stopFetching() diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index c6779112..40b83720 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -92,6 +92,7 @@ :user-id="userId" :pinned-status-ids="user.pinnedStatusIds" :in-profile="true" + :fetch-params="fetchParams" :footer-slipgate="footerRef" />