fix pin showing logic in conversation
This commit is contained in:
parent
61f61947ad
commit
4b444708f2
@ -1,4 +1,4 @@
|
||||
import { reduce, filter, findIndex, clone } from 'lodash'
|
||||
import { reduce, filter, findIndex, clone, keyBy } from 'lodash'
|
||||
import Status from '../status/status.vue'
|
||||
|
||||
const sortById = (a, b) => {
|
||||
@ -42,7 +42,7 @@ const conversation = {
|
||||
'statusoid',
|
||||
'collapsable',
|
||||
'isPage',
|
||||
'showPinned'
|
||||
'pinnedStatusIds'
|
||||
],
|
||||
created () {
|
||||
if (this.isPage) {
|
||||
@ -104,6 +104,9 @@ const conversation = {
|
||||
},
|
||||
isExpanded () {
|
||||
return this.expanded || this.isPage
|
||||
},
|
||||
pinnedStatusIdsObject () {
|
||||
return keyBy(this.pinnedStatusIds, id => id)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -21,7 +21,7 @@
|
||||
:inline-expanded="collapsable && isExpanded"
|
||||
:statusoid="status"
|
||||
:expandable="!isExpanded"
|
||||
:show-pinned="showPinned"
|
||||
:show-pinned="pinnedStatusIdsObject[status.id]"
|
||||
:focused="focused(status.id)"
|
||||
:in-conversation="isExpanded"
|
||||
:highlight="getHighlight()"
|
||||
|
@ -32,7 +32,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<div
|
||||
v-if="showPinned && statusoid.pinned"
|
||||
v-if="showPinned"
|
||||
class="status-pin"
|
||||
>
|
||||
<i class="fa icon-pin faint" />
|
||||
|
@ -35,7 +35,7 @@
|
||||
class="status-fadein"
|
||||
:statusoid="timeline.statusesObject[statusId]"
|
||||
:collapsable="true"
|
||||
:show-pinned="true"
|
||||
:pinned-status-ids="pinnedStatusIds"
|
||||
/>
|
||||
</template>
|
||||
<template v-for="status in timeline.visibleStatuses">
|
||||
|
Loading…
Reference in New Issue
Block a user