pl-fe: disableUserProvidedMedia: do not display description when it's the default one

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-04-24 22:11:16 +02:00
parent 7aaf4c2431
commit e2dfdfb4a5
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import StillImage, { IStillImage } from 'pl-fe/components/still-image'; import StillImage, { IStillImage } from 'pl-fe/components/still-image';
import { useSettings } from 'pl-fe/hooks/use-settings'; import { useSettings } from 'pl-fe/hooks/use-settings';
import { isDefaultAvatar } from 'pl-fe/utils/accounts';
import AltIndicator from '../alt-indicator'; import AltIndicator from '../alt-indicator';
@ -66,7 +67,7 @@ const Avatar = (props: IAvatar) => {
}), [size, color]); }), [size, color]);
if (disableUserProvidedMedia) { if (disableUserProvidedMedia) {
if (isAvatarMissing || !alt) return null; if (isAvatarMissing || !alt || isDefaultAvatar(src)) return null;
return ( return (
<Popover <Popover
interaction='hover' interaction='hover'

View File

@ -572,7 +572,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
let header: React.ReactNode; let header: React.ReactNode;
if (settings.disableUserProvidedMedia) { if (settings.disableUserProvidedMedia) {
if (!account.header_description) return null; if (!account.header_description || isDefaultHeader(account.header)) return null;
else return ( else return (
<Popover <Popover
interaction='hover' interaction='hover'