From 7f9feacd264915df92d14399dc9c1aa5cb4d22e7 Mon Sep 17 00:00:00 2001 From: taehoon Date: Sun, 26 May 2019 14:15:35 -0400 Subject: prevent showing pinned statuses twice --- src/components/timeline/timeline.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/components/timeline/timeline.js') diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 5e24bd15..55602c7b 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -11,7 +11,8 @@ const Timeline = { 'userId', 'tag', 'embedded', - 'count' + 'count', + 'excludedStatusIds' ], data () { return { @@ -39,6 +40,13 @@ const Timeline = { body: ['timeline-body'].concat(!this.embedded ? ['panel-body'] : []), footer: ['timeline-footer'].concat(!this.embedded ? ['panel-footer'] : []) } + }, + statuses () { + if (this.excludedStatusIds && this.excludedStatusIds.length > 0) { + return this.timeline.visibleStatuses && this.timeline.visibleStatuses.filter(status => !this.excludedStatusIds.includes(status.id)) + } else { + return this.timeline.visibleStatuses + } } }, components: { -- cgit v1.2.3-70-g09d2