lol, lmao, that was some shit, this is much easier and works all the time
This commit is contained in:
parent
2a97bdb39d
commit
a31ff20f50
3 changed files with 3 additions and 49 deletions
|
@ -12,19 +12,6 @@ library.add(
|
|||
faCog
|
||||
)
|
||||
|
||||
export const getExcludedStatusIdsByPinning = (statuses, pinnedStatusIds) => {
|
||||
const ids = []
|
||||
if (pinnedStatusIds && pinnedStatusIds.length > 0) {
|
||||
for (let status of statuses) {
|
||||
if (!pinnedStatusIds.includes(status.id)) {
|
||||
break
|
||||
}
|
||||
ids.push(status.id)
|
||||
}
|
||||
}
|
||||
return ids
|
||||
}
|
||||
|
||||
const Timeline = {
|
||||
props: [
|
||||
'timeline',
|
||||
|
@ -77,11 +64,6 @@ const Timeline = {
|
|||
}
|
||||
},
|
||||
// id map of statuses which need to be hidden in the main list due to pinning logic
|
||||
excludedStatusIdsObject () {
|
||||
const ids = getExcludedStatusIdsByPinning(this.timeline.visibleStatuses, this.pinnedStatusIds)
|
||||
// Convert id array to object
|
||||
return keyBy(ids)
|
||||
},
|
||||
pinnedStatusIdsObject () {
|
||||
return keyBy(this.pinnedStatusIds)
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue