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:
@ -5,6 +5,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
import StillImage, { IStillImage } from 'pl-fe/components/still-image';
|
||||
import { useSettings } from 'pl-fe/hooks/use-settings';
|
||||
import { isDefaultAvatar } from 'pl-fe/utils/accounts';
|
||||
|
||||
import AltIndicator from '../alt-indicator';
|
||||
|
||||
@ -66,7 +67,7 @@ const Avatar = (props: IAvatar) => {
|
||||
}), [size, color]);
|
||||
|
||||
if (disableUserProvidedMedia) {
|
||||
if (isAvatarMissing || !alt) return null;
|
||||
if (isAvatarMissing || !alt || isDefaultAvatar(src)) return null;
|
||||
return (
|
||||
<Popover
|
||||
interaction='hover'
|
||||
|
||||
@ -572,7 +572,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
||||
let header: React.ReactNode;
|
||||
|
||||
if (settings.disableUserProvidedMedia) {
|
||||
if (!account.header_description) return null;
|
||||
if (!account.header_description || isDefaultHeader(account.header)) return null;
|
||||
else return (
|
||||
<Popover
|
||||
interaction='hover'
|
||||
|
||||
Reference in New Issue
Block a user