fix warnings and better handing of highlight/goto

This commit is contained in:
Henry Jameson 2026-06-30 06:17:17 +03:00
commit 43857fd3eb
5 changed files with 18 additions and 10 deletions

View file

@ -97,7 +97,7 @@
:expandable="!isExpanded"
:focused="isFocused(status.id)"
:highlight="getHighlight()"
:highlight="maybeHighlight"
:inline-expanded="collapsable && isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:in-profile="inProfile"
@ -156,8 +156,7 @@
:is-focused-function="isFocused"
:get-replies="getReplies"
:highlight="maybeHighlight"
:set-highlight="setHighlight"
:highlight="maybeHighlight === status.id"
:toggle-expanded="toggleExpanded"
:simple="treeViewIsSimple"
@ -165,8 +164,9 @@
:show-thread-recursively="showThreadRecursively"
:total-reply-count="totalReplyCount"
:total-reply-depth="totalReplyDepth"
:can-dive="canDive"
@goto="setHighlight"
@dive="diveIntoStatus"
@suspendable-state-change="onStatusSuspendStateChange"
/>
@ -186,7 +186,7 @@
:expandable="!isExpanded"
:focused="isFocused(status.id)"
:highlight="getHighlight()"
:highlight="maybeHighlight === status.id"
:inline-expanded="collapsable && isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:in-profile="inProfile"

View file

@ -38,6 +38,12 @@ const StatusBody = {
type: Boolean,
default: false,
},
inConversation: {
// Is status rendered within open conversation?
// Used to automatically expand subjects (if collapsed)
type: Boolean,
default: false,
}
},
data() {
return {
@ -70,7 +76,7 @@ const StatusBody = {
// button. If the default is to collapse statuses with subjects, we just treat it like
// a status with a subject; otherwise, we just treat it like a tall status.
mightHideBecauseSubject() {
return this.hasSubject && this.mergedConfig.collapseMessageWithSubject
return !this.inConversation && this.hasSubject && this.mergedConfig.collapseMessageWithSubject
},
mightHideBecauseTall() {
if (this.singleLine || this.compact) return false

View file

@ -9,6 +9,7 @@
:compact="compact"
:single-line="singleLine"
:collapse="collapse"
:in-conversation="inConversation"
@parse-ready="$emit('parseReady', $event)"
>
<div v-if="status.poll && status.poll.options && !compact">

View file

@ -32,7 +32,7 @@ const ThreadTree = {
totalReplyCount: Object,
totalReplyDepth: Object,
},
emits: ['suspendableStateChange', 'dive'],
emits: ['suspendableStateChange', 'goto', 'dive'],
computed: {
reverseLookupTable() {
return this.conversation.reduce(

View file

@ -10,17 +10,17 @@
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="isFocusedFunction(status.id)"
:in-conversation="isExpanded"
:highlight="highlight"
:highlight="highlight === status.id"
:in-profile="inProfile"
:profile-user-id="profileUserId"
class="conversation-status conversation-status-treeview status-fadein panel-body"
:simple-tree="simple"
:thread-display-status="threadDisplayStatus[status.id]"
:can-dive="canDive"
@dive="$emit('dive', status.id)"
@goto="setHighlight"
@goto="$emit('goto', status.id)"
@toggle-expanded="toggleExpanded"
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
/>
@ -55,6 +55,7 @@
:total-reply-depth="totalReplyDepth"
:can-dive="canDive"
@goto="(e) => $emit('goto', e)"
@dive="(e) => $emit('dive', e)"
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
/>