mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 09:15:33 +03:00
Make filtered status work for boosts too
This commit is contained in:
parent
f5646fe8a8
commit
35a8641f16
1 changed files with 19 additions and 3 deletions
|
@ -1728,10 +1728,12 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
|
|||
account: { avatar, avatarStatic },
|
||||
createdAt,
|
||||
visibility,
|
||||
reblog,
|
||||
} = status;
|
||||
const isReblog = !!reblog;
|
||||
const filterTitleStr = filterInfo?.titlesStr || '';
|
||||
const createdAtDate = new Date(createdAt);
|
||||
const statusPeekText = statusPeek(status);
|
||||
const statusPeekText = statusPeek(status.reblog || status);
|
||||
|
||||
const [showPeek, setShowPeek] = useState(false);
|
||||
const bindLongPress = useLongPress(
|
||||
|
@ -1747,6 +1749,7 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
|
|||
|
||||
return (
|
||||
<div
|
||||
class={isReblog ? 'status-reblog' : ''}
|
||||
{...containerProps}
|
||||
title={statusPeekText}
|
||||
onContextMenu={(e) => {
|
||||
|
@ -1776,9 +1779,22 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
|
|||
alt={visibilityText[visibility]}
|
||||
size="s"
|
||||
/>{' '}
|
||||
<RelativeTime datetime={createdAtDate} format="micro" />
|
||||
{isReblog ? (
|
||||
'boosted'
|
||||
) : (
|
||||
<RelativeTime datetime={createdAtDate} format="micro" />
|
||||
)}
|
||||
</span>
|
||||
<span class="status-filtered-info-2">
|
||||
{isReblog && (
|
||||
<>
|
||||
<Avatar
|
||||
url={reblog.account.avatarStatic || reblog.account.avatar}
|
||||
/>{' '}
|
||||
</>
|
||||
)}
|
||||
{statusPeekText}
|
||||
</span>
|
||||
<span class="status-filtered-info-2">{statusPeekText}</span>
|
||||
</span>
|
||||
</article>
|
||||
{!!showPeek && (
|
||||
|
|
Loading…
Reference in a new issue