From 7e34d65b2d69dd42b615d925d11e8527b6bbce7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Lo=CC=81pez=20Guevara?= Date: Fri, 10 Feb 2023 09:40:08 -0300 Subject: [PATCH] fix(contet): keep load-media 'none' working --- src/Element/HyperText.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Element/HyperText.tsx b/src/Element/HyperText.tsx index 71c720a4..b6f51835 100644 --- a/src/Element/HyperText.tsx +++ b/src/Element/HyperText.tsx @@ -27,15 +27,14 @@ export default function HyperText({ link, creator }: { link: string; creator: He const render = useCallback(() => { const a = link; try { - if (creator !== publicKey) { - const hideNonFollows = pref.autoLoadMedia === "follows-only" && !follows.includes(creator); - if (pref.autoLoadMedia === "none" || hideNonFollows) { - return ( - e.stopPropagation()} target="_blank" rel="noreferrer" className="ext"> - {a} - - ); - } + const hideNonFollows = pref.autoLoadMedia === "follows-only" && !follows.includes(creator); + const isMine = creator === publicKey; + if (pref.autoLoadMedia === "none" || (!isMine && hideNonFollows)) { + return ( + e.stopPropagation()} target="_blank" rel="noreferrer" className="ext"> + {a} + + ); } const url = new URL(a); const youtubeId = YoutubeUrlRegex.test(a) && RegExp.$1;