forked from AkkomaGang/akkoma-fe
prevent showing pinned statuses twice
This commit is contained in:
parent
4827e4d972
commit
7f9feacd26
3 changed files with 11 additions and 2 deletions
|
@ -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: {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
timeline-name="media"
|
||||
:timeline="media"
|
||||
:user-id="userId"
|
||||
:excludedStatusIds="user.pinnedStatuseIds"
|
||||
/>
|
||||
<Timeline
|
||||
v-if="isUs"
|
||||
|
|
Loading…
Reference in a new issue