nicolium: fix disableUserProvidedMedia misses
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -412,7 +412,6 @@ const MediaGallery: React.FC<IMediaGallery> = (props) => {
|
||||
}[attachment.type]}
|
||||
</Text>
|
||||
</button>
|
||||
// <MediaItem key={index} item={item} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -113,6 +113,7 @@ const PreviewCard: React.FC<IPreviewCard> = ({
|
||||
const intl = useIntl();
|
||||
const {
|
||||
urlPrivacy: { clearLinksInContent, redirectLinksMode },
|
||||
disableUserProvidedMedia,
|
||||
} = useSettings();
|
||||
const [width, setWidth] = useState(defaultWidth);
|
||||
const [embedded, setEmbedded] = useState(false);
|
||||
@ -237,7 +238,7 @@ const PreviewCard: React.FC<IPreviewCard> = ({
|
||||
/>
|
||||
);
|
||||
|
||||
if (interactive) {
|
||||
if (interactive && !disableUserProvidedMedia) {
|
||||
if (embedded) {
|
||||
embed = <PreviewCardVideo card={card} />;
|
||||
} else {
|
||||
@ -295,7 +296,7 @@ const PreviewCard: React.FC<IPreviewCard> = ({
|
||||
{description}
|
||||
</div>
|
||||
);
|
||||
} else if (card.image) {
|
||||
} else if (card.image && !disableUserProvidedMedia) {
|
||||
embed = (
|
||||
<div
|
||||
className={clsx(
|
||||
|
||||
@ -35,7 +35,7 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
|
||||
accountIds,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const { autoloadTimelines } = useSettings();
|
||||
const { autoloadTimelines, disableUserProvidedMedia } = useSettings();
|
||||
|
||||
// Whether we are scrolled past the `threshold`.
|
||||
const [scrolled, setScrolled] = useState<boolean>(false);
|
||||
@ -105,7 +105,7 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
|
||||
aria-hidden={!visible}
|
||||
>
|
||||
<button onClick={handleClick} tabIndex={visible ? 0 : -1} aria-label={buttonMessage}>
|
||||
{accountIds?.length ? (
|
||||
{accountIds?.length && !disableUserProvidedMedia ? (
|
||||
<AvatarStack accountIds={accountIds} />
|
||||
) : (
|
||||
<Icon src={require('@phosphor-icons/core/regular/arrow-line-up.svg')} aria-hidden />
|
||||
|
||||
@ -36,7 +36,7 @@ interface IStatusMedia {
|
||||
/** Render media attachments for a status. */
|
||||
const StatusMedia: React.FC<IStatusMedia> = ({ status, muted = false, onClick }) => {
|
||||
const { openModal } = useModalsActions();
|
||||
const { displayMedia } = useSettings();
|
||||
const { displayMedia, disableUserProvidedMedia } = useSettings();
|
||||
const { data: account } = useAccount(status.account_id);
|
||||
|
||||
const [visible] = useMediaVisible(status, displayMedia);
|
||||
@ -71,7 +71,7 @@ const StatusMedia: React.FC<IStatusMedia> = ({ status, muted = false, onClick })
|
||||
if (size > 0 && firstAttachment) {
|
||||
if (muted) {
|
||||
media = <AttachmentThumbs status={status} onClick={onClick} />;
|
||||
} else if (size === 1 && firstAttachment.type === 'video') {
|
||||
} else if (size === 1 && firstAttachment.type === 'video' && !disableUserProvidedMedia) {
|
||||
const video = firstAttachment;
|
||||
|
||||
media = (
|
||||
@ -88,7 +88,7 @@ const StatusMedia: React.FC<IStatusMedia> = ({ status, muted = false, onClick })
|
||||
/>
|
||||
</Suspense>
|
||||
);
|
||||
} else if (size === 1 && firstAttachment.type === 'audio') {
|
||||
} else if (size === 1 && firstAttachment.type === 'audio' && !disableUserProvidedMedia) {
|
||||
const attachment = firstAttachment;
|
||||
|
||||
media = (
|
||||
|
||||
@ -202,7 +202,7 @@ const TimelinePicker: React.FC<ITimelinePicker> = ({ active }) => {
|
||||
|
||||
return (
|
||||
<DropdownMenu items={items} width='16rem' placement='bottom-start'>
|
||||
<div className='⁂-timeline-picker'>
|
||||
<div className='⁂-timeline-picker' role='button' tabIndex={0}>
|
||||
{heading}
|
||||
<Icon src={require('@phosphor-icons/core/regular/caret-down.svg')} aria-hidden />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user