use less ambigious currentStatus, fix replies footer
This commit is contained in:
parent
fe5c1f4d43
commit
42eeb1a9c0
2 changed files with 10 additions and 10 deletions
|
|
@ -120,10 +120,10 @@ export default {
|
||||||
get(status, 'statusnet_conversation_id'),
|
get(status, 'statusnet_conversation_id'),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const status = computed(() => getStatusObject(focusedId.value))
|
const currentStatus = computed(() => getStatusObject(focusedId.value))
|
||||||
|
|
||||||
const fetchConversation = async () => {
|
const fetchConversation = async () => {
|
||||||
if (status.value) {
|
if (currentStatus.value) {
|
||||||
const {
|
const {
|
||||||
data: { ancestors, descendants },
|
data: { ancestors, descendants },
|
||||||
timestamp,
|
timestamp,
|
||||||
|
|
@ -192,12 +192,12 @@ export default {
|
||||||
}
|
}
|
||||||
const conversationId = computed(() => getConversationId(statusId.value))
|
const conversationId = computed(() => getConversationId(statusId.value))
|
||||||
const conversation = computed(() => {
|
const conversation = computed(() => {
|
||||||
if (!status.value) {
|
if (!currentStatus.value) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isExpanded.value) {
|
if (!isExpanded.value) {
|
||||||
return [status.value]
|
return [currentStatus.value]
|
||||||
}
|
}
|
||||||
|
|
||||||
const conversation = useStatusesStore().conversations.get(
|
const conversation = useStatusesStore().conversations.get(
|
||||||
|
|
@ -228,7 +228,7 @@ export default {
|
||||||
)
|
)
|
||||||
const getReplies = (id) => replies.value.get(id) ?? new Set()
|
const getReplies = (id) => replies.value.get(id) ?? new Set()
|
||||||
const statusReplies = computed(() => {
|
const statusReplies = computed(() => {
|
||||||
return getReplies(status.value.id)
|
return getReplies(currentStatus.value.id)
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('conversation', conversation)
|
provide('conversation', conversation)
|
||||||
|
|
@ -487,7 +487,7 @@ export default {
|
||||||
setFocused,
|
setFocused,
|
||||||
|
|
||||||
// # Main things
|
// # Main things
|
||||||
status,
|
currentStatus,
|
||||||
statusReplies,
|
statusReplies,
|
||||||
getReplies,
|
getReplies,
|
||||||
conversation,
|
conversation,
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
class="conversation-dive-to-top-level-box"
|
class="conversation-dive-to-top-level-box"
|
||||||
>
|
>
|
||||||
<i18n-t
|
<i18n-t
|
||||||
keypath="status.show_all_conversation_with_icon"
|
keypath="currentStatus.show_all_conversation_with_icon"
|
||||||
tag="button"
|
tag="button"
|
||||||
class="button-unstyled -link"
|
class="button-unstyled -link"
|
||||||
scope="global"
|
scope="global"
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
@height-change="updateVirtualHeight"
|
@height-change="updateVirtualHeight"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="shouldShowOtherRepliesButton && statusReplies.size > 1"
|
v-if="shouldShowOtherRepliesButton && getReplies(status.id).size > 1"
|
||||||
class="thread-ancestor-dive-box"
|
class="thread-ancestor-dive-box"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #text>
|
<template #text>
|
||||||
<span>
|
<span>
|
||||||
{{ $t('status.ancestor_follow', { numReplies: statusReplies.size - 1 }) }}
|
{{ $t('status.ancestor_follow', { numReplies: getReplies(status.id).size - 1 }) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<ThreadTree
|
<ThreadTree
|
||||||
:status-id="status.id"
|
:status-id="currentStatus.id"
|
||||||
:depth="0"
|
:depth="0"
|
||||||
|
|
||||||
@goto="setFocused"
|
@goto="setFocused"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue