pl-fe: don't display duplicated status info
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -94,6 +94,7 @@ interface IStatus {
|
||||
hoverable?: boolean;
|
||||
variant?: 'default' | 'rounded' | 'slim';
|
||||
showGroup?: boolean;
|
||||
showInfo?: boolean;
|
||||
fromBookmarks?: boolean;
|
||||
fromHomeTimeline?: boolean;
|
||||
className?: string;
|
||||
@ -114,6 +115,7 @@ const Status: React.FC<IStatus> = (props) => {
|
||||
hideActionBar,
|
||||
variant = 'rounded',
|
||||
showGroup = true,
|
||||
showInfo = true,
|
||||
fromBookmarks = false,
|
||||
fromHomeTimeline = false,
|
||||
className,
|
||||
@ -253,6 +255,8 @@ const Status: React.FC<IStatus> = (props) => {
|
||||
};
|
||||
|
||||
const statusInfo = useMemo(() => {
|
||||
if (!showInfo) return null;
|
||||
|
||||
if (isReblog && showGroup && group) {
|
||||
return (
|
||||
<StatusInfo
|
||||
|
||||
@ -390,6 +390,7 @@ const Notification: React.FC<INotification> = (props) => {
|
||||
avatarSize={avatarSize}
|
||||
contextType='notifications'
|
||||
showGroup={false}
|
||||
showInfo={false}
|
||||
variant='slim'
|
||||
/>
|
||||
);
|
||||
@ -462,7 +463,7 @@ const Notification: React.FC<INotification> = (props) => {
|
||||
const targetName = notification.type === 'move' ? notification.target.acct : '';
|
||||
|
||||
const message: React.ReactNode = accounts.length
|
||||
? buildMessage(intl, displayedType, accounts, targetName, instance.title, !!status, !!status?.reblog)
|
||||
? buildMessage(intl, displayedType, accounts, targetName, instance.title, !!status, !!status?.reblog_id)
|
||||
: null;
|
||||
|
||||
const ariaLabel = (
|
||||
@ -471,7 +472,7 @@ const Notification: React.FC<INotification> = (props) => {
|
||||
intl.formatMessage(messages[displayedType], {
|
||||
name: accounts.length ? intl.formatList(accounts.map(account => account.acct), { type: 'conjunction' }) : '',
|
||||
targetName,
|
||||
isReblog: status?.reblog ? 1 : 0,
|
||||
isReblog: status?.reblog_id ? 1 : 0,
|
||||
}),
|
||||
notification.latest_page_notification_at!,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user