mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-02 23:19:57 +00:00
fix: replying to self
This commit is contained in:
parent
7c594c68f7
commit
b81ca280e5
1 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,8 @@ const { status } = defineProps<{
|
||||||
status: Status
|
status: Status
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const account = useAccountById(status.inReplyToAccountId)
|
const isSelf = $computed(() => status.inReplyToAccountId === status.account.id)
|
||||||
|
const account = isSelf ? computed(() => status.account) : useAccountById(status.inReplyToAccountId)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -17,7 +18,7 @@ const account = useAccountById(status.inReplyToAccountId)
|
||||||
:title="account ? `Replying to ${getDisplayName(account)}` : 'Replying to someone'"
|
:title="account ? `Replying to ${getDisplayName(account)}` : 'Replying to someone'"
|
||||||
>
|
>
|
||||||
<div i-ri:reply-fill class="scale-x-[-1]" text-secondary-light />
|
<div i-ri:reply-fill class="scale-x-[-1]" text-secondary-light />
|
||||||
<template v-if="account?.id !== status.account.id">
|
<template v-if="!isSelf">
|
||||||
<AccountInlineInfo v-if="account" :account="account" :link="false" />
|
<AccountInlineInfo v-if="account" :account="account" :link="false" />
|
||||||
<span v-else ws-nowrap>{{ $t('status.someone') }}</span>
|
<span v-else ws-nowrap>{{ $t('status.someone') }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue