Fix reply parent hint not appearing

Also respect language
This commit is contained in:
Lim Chee Aun 2024-01-30 17:43:02 +08:00
parent 3470b9adec
commit 26d445af7d
2 changed files with 16 additions and 4 deletions

View file

@ -1273,7 +1273,7 @@ function Status({
return ( return (
<> <>
{showReplyParent && !!(inReplyToId && inReplyToAccount) && ( {showReplyParent && !!(inReplyToId && inReplyToAccountId) && (
<StatusCompact sKey={sKey} /> <StatusCompact sKey={sKey} />
)} )}
<article <article
@ -2441,6 +2441,7 @@ function StatusCompact({ sKey }) {
account: { avatar, avatarStatic, bot }, account: { avatar, avatarStatic, bot },
visibility, visibility,
content, content,
language,
} = status; } = status;
if (sensitive || spoilerText) return null; if (sensitive || spoilerText) return null;
if (!content) return null; if (!content) return null;
@ -2454,7 +2455,12 @@ function StatusCompact({ sKey }) {
tabindex="-1" tabindex="-1"
> >
<Avatar url={avatarStatic || avatar} squircle={bot} /> <Avatar url={avatarStatic || avatar} squircle={bot} />
<div class="content-compact" title={statusPeekText}> <div
class="content-compact"
title={statusPeekText}
lang={language}
dir="auto"
>
{statusPeekText} {statusPeekText}
</div> </div>
</article> </article>

View file

@ -433,6 +433,7 @@ function Timeline({
key={status.id + status?._pinned + view} key={status.id + status?._pinned + view}
view={view} view={view}
showFollowedTags={showFollowedTags} showFollowedTags={showFollowedTags}
showReplyParent={showReplyParent}
/> />
))} ))}
{showMore && {showMore &&
@ -789,7 +790,7 @@ function StatusCarousel({ title, class: className, children }) {
function TimelineStatusCompact({ status, instance }) { function TimelineStatusCompact({ status, instance }) {
const snapStates = useSnapshot(states); const snapStates = useSnapshot(states);
const { id, visibility } = status; const { id, visibility, language } = status;
const statusPeekText = statusPeek(status); const statusPeekText = statusPeek(status);
const sKey = statusKey(id, instance); const sKey = statusKey(id, instance);
return ( return (
@ -811,7 +812,12 @@ function TimelineStatusCompact({ status, instance }) {
<Icon icon="thread" size="s" /> <Icon icon="thread" size="s" />
</div> </div>
)} )}
<div class="content-compact" title={statusPeekText}> <div
class="content-compact"
title={statusPeekText}
lang={language}
dir="auto"
>
{statusPeekText} {statusPeekText}
{status.sensitive && status.spoilerText && ( {status.sensitive && status.spoilerText && (
<> <>