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 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'
|
||||||
|
|||||||
@ -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'
|
||||||
|
|||||||
Reference in New Issue
Block a user