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