Commit 7f9feacd authored by Tae Hoon's avatar Tae Hoon

prevent showing pinned statuses twice

parent 4827e4d9
...@@ -11,7 +11,8 @@ const Timeline = { ...@@ -11,7 +11,8 @@ const Timeline = {
'userId', 'userId',
'tag', 'tag',
'embedded', 'embedded',
'count' 'count',
'excludedStatusIds'
], ],
data () { data () {
return { return {
...@@ -39,6 +40,13 @@ const Timeline = { ...@@ -39,6 +40,13 @@ const Timeline = {
body: ['timeline-body'].concat(!this.embedded ? ['panel-body'] : []), body: ['timeline-body'].concat(!this.embedded ? ['panel-body'] : []),
footer: ['timeline-footer'].concat(!this.embedded ? ['panel-footer'] : []) 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: { components: {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div :class="classes.body"> <div :class="classes.body">
<div class="timeline"> <div class="timeline">
<conversation <conversation
v-for="status in timeline.visibleStatuses" v-for="status in statuses"
:key="status.id" :key="status.id"
class="status-fadein" class="status-fadein"
:statusoid="status" :statusoid="status"
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
timeline-name="media" timeline-name="media"
:timeline="media" :timeline="media"
:user-id="userId" :user-id="userId"
:excludedStatusIds="user.pinnedStatuseIds"
/> />
<Timeline <Timeline
v-if="isUs" v-if="isUs"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment