diff options
| author | taehoon <th.dev91@gmail.com> | 2019-05-26 14:15:35 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-07-24 21:02:37 -0400 |
| commit | 7f9feacd264915df92d14399dc9c1aa5cb4d22e7 (patch) | |
| tree | 4768f4375477b2509fe47f07b56d657dfc8962da /src | |
| parent | 4827e4d972f8ee11e606693e24ae4ca21711c6b1 (diff) | |
prevent showing pinned statuses twice
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/timeline/timeline.js | 10 | ||||
| -rw-r--r-- | src/components/timeline/timeline.vue | 2 | ||||
| -rw-r--r-- | src/components/user_profile/user_profile.vue | 1 |
3 files changed, 11 insertions, 2 deletions
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: { diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 1fc52083..623f65d7 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -29,7 +29,7 @@ <div :class="classes.body"> <div class="timeline"> <conversation - v-for="status in timeline.visibleStatuses" + v-for="status in statuses" :key="status.id" class="status-fadein" :statusoid="status" diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 4ea0a869..1723cffa 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -75,6 +75,7 @@ timeline-name="media" :timeline="media" :user-id="userId" + :excludedStatusIds="user.pinnedStatuseIds" /> <Timeline v-if="isUs" |
