Merge branch '640' into 'develop'

Fix "Mixed pin markers from multiple users"

Closes #640

See merge request pleroma/pleroma-fe!919
This commit is contained in:
Shpuld Shpludson 2019-08-18 08:24:56 +00:00
commit 6504d8ca0f
5 changed files with 8 additions and 5 deletions

View file

@ -42,7 +42,7 @@ const conversation = {
'statusoid', 'statusoid',
'collapsable', 'collapsable',
'isPage', 'isPage',
'showPinned' 'pinnedStatusIdsObject'
], ],
created () { created () {
if (this.isPage) { if (this.isPage) {

View file

@ -21,7 +21,7 @@
:inline-expanded="collapsable && isExpanded" :inline-expanded="collapsable && isExpanded"
:statusoid="status" :statusoid="status"
:expandable="!isExpanded" :expandable="!isExpanded"
:show-pinned="showPinned" :show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="focused(status.id)" :focused="focused(status.id)"
:in-conversation="isExpanded" :in-conversation="isExpanded"
:highlight="getHighlight()" :highlight="getHighlight()"

View file

@ -32,7 +32,7 @@
</template> </template>
<template v-else> <template v-else>
<div <div
v-if="showPinned && statusoid.pinned" v-if="showPinned"
class="status-pin" class="status-pin"
> >
<i class="fa icon-pin faint" /> <i class="fa icon-pin faint" />

View file

@ -58,7 +58,10 @@ const Timeline = {
excludedStatusIdsObject () { excludedStatusIdsObject () {
const ids = getExcludedStatusIdsByPinning(this.timeline.visibleStatuses, this.pinnedStatusIds) const ids = getExcludedStatusIdsByPinning(this.timeline.visibleStatuses, this.pinnedStatusIds)
// Convert id array to object // Convert id array to object
return keyBy(ids, id => id) return keyBy(ids)
},
pinnedStatusIdsObject () {
return keyBy(this.pinnedStatusIds)
} }
}, },
components: { components: {

View file

@ -35,7 +35,7 @@
class="status-fadein" class="status-fadein"
:statusoid="timeline.statusesObject[statusId]" :statusoid="timeline.statusesObject[statusId]"
:collapsable="true" :collapsable="true"
:show-pinned="true" :pinned-status-ids-object="pinnedStatusIdsObject"
/> />
</template> </template>
<template v-for="status in timeline.visibleStatuses"> <template v-for="status in timeline.visibleStatuses">