fix forms closing in timelines

This commit is contained in:
Henry Jameson 2022-03-24 14:09:25 +02:00
parent 3fb647b34b
commit b7755314b1
2 changed files with 26 additions and 24 deletions

View file

@ -40,6 +40,12 @@ const Timeline = {
TimelineQuickSettings TimelineQuickSettings
}, },
computed: { computed: {
filteredVisibleStatuses () {
return this.timeline.visibleStatuses.filter(status => this.timelineName !== 'user' || (status.id >= this.timeline.minId && status.id <= this.timeline.maxId))
},
filteredPinnedStatusesId () {
return this.pinnedStatusIds.filter(statusId => this.timeline.statusesObject[statusId])
},
newStatusCount () { newStatusCount () {
return this.timeline.newStatusCount return this.timeline.newStatusCount
}, },

View file

@ -23,9 +23,8 @@
ref="timeline" ref="timeline"
class="timeline" class="timeline"
> >
<template v-for="statusId in pinnedStatusIds">
<conversation <conversation
v-if="timeline.statusesObject[statusId]" v-for="statusId in filteredPinnedStatusIds"
:key="statusId + '-pinned'" :key="statusId + '-pinned'"
class="status-fadein" class="status-fadein"
:status-id="statusId" :status-id="statusId"
@ -34,10 +33,8 @@
:in-profile="inProfile" :in-profile="inProfile"
:profile-user-id="userId" :profile-user-id="userId"
/> />
</template>
<template v-for="status in timeline.visibleStatuses">
<conversation <conversation
v-if="timelineName !== 'user' || (status.id >= timeline.minId && status.id <= timeline.maxId)" v-for="status in filteredVisibleStatuses"
:key="status.id" :key="status.id"
class="status-fadein" class="status-fadein"
:status-id="status.id" :status-id="status.id"
@ -46,7 +43,6 @@
:profile-user-id="userId" :profile-user-id="userId"
:virtual-hidden="virtualScrollingEnabled && !statusesToDisplay.includes(status.id)" :virtual-hidden="virtualScrollingEnabled && !statusesToDisplay.includes(status.id)"
/> />
</template>
</div> </div>
</div> </div>
<div :class="classes.footer"> <div :class="classes.footer">