update status eliminating logic
This commit is contained in:
parent
876c6de806
commit
0f8ace4836
@ -41,12 +41,18 @@ const Timeline = {
|
|||||||
footer: ['timeline-footer'].concat(!this.embedded ? ['panel-footer'] : [])
|
footer: ['timeline-footer'].concat(!this.embedded ? ['panel-footer'] : [])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
statuses () {
|
// id map of statuses which need to be hidden in the main list due to pinning logic
|
||||||
|
excludedStatusIdsObject () {
|
||||||
|
const result = {}
|
||||||
if (this.pinnedStatusIds && this.pinnedStatusIds.length > 0) {
|
if (this.pinnedStatusIds && this.pinnedStatusIds.length > 0) {
|
||||||
return this.timeline.visibleStatuses && this.timeline.visibleStatuses.filter(status => !this.pinnedStatusIds.includes(status.id))
|
for (let status of this.timeline.visibleStatuses) {
|
||||||
} else {
|
if (this.pinnedStatusIds.indexOf(status.id) === -1) {
|
||||||
return this.timeline.visibleStatuses
|
break
|
||||||
|
}
|
||||||
|
result[status.id] = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
@ -38,13 +38,15 @@
|
|||||||
:show-pinned="true"
|
:show-pinned="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<conversation
|
<template v-for="status in timeline.visibleStatuses">
|
||||||
v-for="status in statuses"
|
<conversation
|
||||||
:key="status.id"
|
v-if="!excludedStatusIdsObject[status.id]"
|
||||||
class="status-fadein"
|
:key="status.id"
|
||||||
:statusoid="status"
|
class="status-fadein"
|
||||||
:collapsable="true"
|
:statusoid="status"
|
||||||
/>
|
:collapsable="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="classes.footer">
|
<div :class="classes.footer">
|
||||||
|
Loading…
Reference in New Issue
Block a user