diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx
index 2ef93e00..f58edb9d 100644
--- a/src/app/components/RenderMessageContent.tsx
+++ b/src/app/components/RenderMessageContent.tsx
@@ -114,16 +114,17 @@ function RenderMessageContentInternal({
return (
- {toRender.map(({ url, type }) => (!!type ? (
-
- ) : (clientUrlPreview ? (
-
- ) : undefined)
- ))}
+ {toRender.map(({ url, type }) =>
+ type ? (
+
+ ) : clientUrlPreview ? (
+
+ ) : undefined
+ )}
);
},
- [ts]
+ [ts, clientUrlPreview]
);
const renderCaption = () => {
diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx
index 198563c4..dd655dee 100644
--- a/src/app/features/room/RoomTimeline.tsx
+++ b/src/app/features/room/RoomTimeline.tsx
@@ -144,7 +144,9 @@ export function RoomTimeline({
const [hideMemberInReadOnly] = useSetting(settingsAtom, 'hideMembershipInReadOnly');
const showUrlPreview = room.hasEncryptionStateEvent() ? encUrlPreview : urlPreview;
- const showClientUrlPreview = room.hasEncryptionStateEvent() ? encClientUrlPreview : clientUrlPreview;
+ const showClientUrlPreview = room.hasEncryptionStateEvent()
+ ? encClientUrlPreview
+ : clientUrlPreview;
const nicknames = useAtomValue(nicknamesAtom);
const globalProfiles = useAtomValue(profilesCacheAtom);
@@ -486,7 +488,7 @@ export function RoomTimeline({
dateFormatString,
mediaAutoLoad,
showUrlPreview,
- showClientUrlPreview,
+ showClientUrlPreview,
autoplayStickers,
hideMemberInReadOnly,
isReadOnly,
diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx
index cf57a559..05485718 100644
--- a/src/app/features/settings/general/General.tsx
+++ b/src/app/features/settings/general/General.tsx
@@ -871,8 +871,14 @@ function Messages() {
const [urlPreview, setUrlPreview] = useSetting(settingsAtom, 'urlPreview');
const [encUrlPreview, setEncUrlPreview] = useSetting(settingsAtom, 'encUrlPreview');
const [clientUrlPreview, setClientUrlPreview] = useSetting(settingsAtom, 'clientUrlPreview');
- const [encClientUrlPreview, setEncClientUrlPreview] = useSetting(settingsAtom, 'encClientUrlPreview');
- const [clientPreviewYoutube, setClientPreviewYoutube] = useSetting(settingsAtom, 'clientPreviewYoutube');
+ const [encClientUrlPreview, setEncClientUrlPreview] = useSetting(
+ settingsAtom,
+ 'encClientUrlPreview'
+ );
+ const [clientPreviewYoutube, setClientPreviewYoutube] = useSetting(
+ settingsAtom,
+ 'clientPreviewYoutube'
+ );
const [showHiddenEvents, setShowHiddenEvents] = useSetting(settingsAtom, 'showHiddenEvents');
const [showTombstoneEvents, setShowTombstoneEvents] = useSetting(
settingsAtom,
@@ -960,27 +966,51 @@ function Messages() {
after={}
/>
-
- }
- />
-
-
- }
- />
-
-
- }
- />
-
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+