diff options
Diffstat (limited to 'src/components/timeline/timeline.js')
| -rw-r--r-- | src/components/timeline/timeline.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 7c8a761a..b1413591 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -41,12 +41,18 @@ const Timeline = { 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) { - return this.timeline.visibleStatuses && this.timeline.visibleStatuses.filter(status => !this.pinnedStatusIds.includes(status.id)) - } else { - return this.timeline.visibleStatuses + for (let status of this.timeline.visibleStatuses) { + if (this.pinnedStatusIds.indexOf(status.id) === -1) { + break + } + result[status.id] = true + } } + return result } }, components: { |
