fix warnings and better handing of highlight/goto
This commit is contained in:
parent
06fdcb8dd3
commit
43857fd3eb
5 changed files with 18 additions and 10 deletions
|
|
@ -97,7 +97,7 @@
|
||||||
|
|
||||||
:expandable="!isExpanded"
|
:expandable="!isExpanded"
|
||||||
:focused="isFocused(status.id)"
|
:focused="isFocused(status.id)"
|
||||||
:highlight="getHighlight()"
|
:highlight="maybeHighlight"
|
||||||
:inline-expanded="collapsable && isExpanded"
|
:inline-expanded="collapsable && isExpanded"
|
||||||
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
||||||
:in-profile="inProfile"
|
:in-profile="inProfile"
|
||||||
|
|
@ -156,8 +156,7 @@
|
||||||
|
|
||||||
:is-focused-function="isFocused"
|
:is-focused-function="isFocused"
|
||||||
:get-replies="getReplies"
|
:get-replies="getReplies"
|
||||||
:highlight="maybeHighlight"
|
:highlight="maybeHighlight === status.id"
|
||||||
:set-highlight="setHighlight"
|
|
||||||
:toggle-expanded="toggleExpanded"
|
:toggle-expanded="toggleExpanded"
|
||||||
|
|
||||||
:simple="treeViewIsSimple"
|
:simple="treeViewIsSimple"
|
||||||
|
|
@ -165,8 +164,9 @@
|
||||||
:show-thread-recursively="showThreadRecursively"
|
:show-thread-recursively="showThreadRecursively"
|
||||||
:total-reply-count="totalReplyCount"
|
:total-reply-count="totalReplyCount"
|
||||||
:total-reply-depth="totalReplyDepth"
|
:total-reply-depth="totalReplyDepth"
|
||||||
|
|
||||||
:can-dive="canDive"
|
:can-dive="canDive"
|
||||||
|
|
||||||
|
@goto="setHighlight"
|
||||||
@dive="diveIntoStatus"
|
@dive="diveIntoStatus"
|
||||||
@suspendable-state-change="onStatusSuspendStateChange"
|
@suspendable-state-change="onStatusSuspendStateChange"
|
||||||
/>
|
/>
|
||||||
|
|
@ -186,7 +186,7 @@
|
||||||
|
|
||||||
:expandable="!isExpanded"
|
:expandable="!isExpanded"
|
||||||
:focused="isFocused(status.id)"
|
:focused="isFocused(status.id)"
|
||||||
:highlight="getHighlight()"
|
:highlight="maybeHighlight === status.id"
|
||||||
:inline-expanded="collapsable && isExpanded"
|
:inline-expanded="collapsable && isExpanded"
|
||||||
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
||||||
:in-profile="inProfile"
|
:in-profile="inProfile"
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,12 @@ const StatusBody = {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
inConversation: {
|
||||||
|
// Is status rendered within open conversation?
|
||||||
|
// Used to automatically expand subjects (if collapsed)
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -70,7 +76,7 @@ const StatusBody = {
|
||||||
// button. If the default is to collapse statuses with subjects, we just treat it like
|
// 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.
|
// a status with a subject; otherwise, we just treat it like a tall status.
|
||||||
mightHideBecauseSubject() {
|
mightHideBecauseSubject() {
|
||||||
return this.hasSubject && this.mergedConfig.collapseMessageWithSubject
|
return !this.inConversation && this.hasSubject && this.mergedConfig.collapseMessageWithSubject
|
||||||
},
|
},
|
||||||
mightHideBecauseTall() {
|
mightHideBecauseTall() {
|
||||||
if (this.singleLine || this.compact) return false
|
if (this.singleLine || this.compact) return false
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
:compact="compact"
|
:compact="compact"
|
||||||
:single-line="singleLine"
|
:single-line="singleLine"
|
||||||
:collapse="collapse"
|
:collapse="collapse"
|
||||||
|
:in-conversation="inConversation"
|
||||||
@parse-ready="$emit('parseReady', $event)"
|
@parse-ready="$emit('parseReady', $event)"
|
||||||
>
|
>
|
||||||
<div v-if="status.poll && status.poll.options && !compact">
|
<div v-if="status.poll && status.poll.options && !compact">
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ const ThreadTree = {
|
||||||
totalReplyCount: Object,
|
totalReplyCount: Object,
|
||||||
totalReplyDepth: Object,
|
totalReplyDepth: Object,
|
||||||
},
|
},
|
||||||
emits: ['suspendableStateChange', 'dive'],
|
emits: ['suspendableStateChange', 'goto', 'dive'],
|
||||||
computed: {
|
computed: {
|
||||||
reverseLookupTable() {
|
reverseLookupTable() {
|
||||||
return this.conversation.reduce(
|
return this.conversation.reduce(
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,17 @@
|
||||||
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
||||||
:focused="isFocusedFunction(status.id)"
|
:focused="isFocusedFunction(status.id)"
|
||||||
:in-conversation="isExpanded"
|
:in-conversation="isExpanded"
|
||||||
:highlight="highlight"
|
:highlight="highlight === status.id"
|
||||||
:in-profile="inProfile"
|
:in-profile="inProfile"
|
||||||
:profile-user-id="profileUserId"
|
:profile-user-id="profileUserId"
|
||||||
class="conversation-status conversation-status-treeview status-fadein panel-body"
|
class="conversation-status conversation-status-treeview status-fadein panel-body"
|
||||||
|
|
||||||
:simple-tree="simple"
|
:simple-tree="simple"
|
||||||
:thread-display-status="threadDisplayStatus[status.id]"
|
:thread-display-status="threadDisplayStatus[status.id]"
|
||||||
|
|
||||||
:can-dive="canDive"
|
:can-dive="canDive"
|
||||||
|
|
||||||
@dive="$emit('dive', status.id)"
|
@dive="$emit('dive', status.id)"
|
||||||
@goto="setHighlight"
|
@goto="$emit('goto', status.id)"
|
||||||
@toggle-expanded="toggleExpanded"
|
@toggle-expanded="toggleExpanded"
|
||||||
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
|
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
|
||||||
/>
|
/>
|
||||||
|
|
@ -55,6 +55,7 @@
|
||||||
:total-reply-depth="totalReplyDepth"
|
:total-reply-depth="totalReplyDepth"
|
||||||
|
|
||||||
:can-dive="canDive"
|
:can-dive="canDive"
|
||||||
|
@goto="(e) => $emit('goto', e)"
|
||||||
@dive="(e) => $emit('dive', e)"
|
@dive="(e) => $emit('dive', e)"
|
||||||
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
|
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue