diff --git a/src/app/molecules/media/Media.jsx b/src/app/molecules/media/Media.jsx
index 977d184b..5bbff64e 100644
--- a/src/app/molecules/media/Media.jsx
+++ b/src/app/molecules/media/Media.jsx
@@ -440,28 +440,27 @@ function Embed({ link }) {
});
if (urlPreviewInfo != null) {
+ const imageURL = urlPreviewInfo['og:image'] || urlPreviewInfo['og:image:secure_url'];
+ const image = (imageURL != null) ? (
+
+ ) : null;
+
// Image only embed
- if (urlPreviewInfo['og:image'] != null && urlPreviewInfo['og:image:width'] != null && urlPreviewInfo['og:image:height'] != null && urlPreviewInfo['og:title'] == null && urlPreviewInfo['og:description'] == null) {
+ if (image != null && urlPreviewInfo['og:title'] == null && urlPreviewInfo['og:description'] == null) {
return (
-
+ {image}
);
}
- let embedTitle;
-
- if (urlPreviewInfo['og:site_name'] != null && urlPreviewInfo['og:title'] != null) {
- embedTitle = `${urlPreviewInfo['og:site_name']} - ${urlPreviewInfo['og:title']}`;
- } else {
- embedTitle = urlPreviewInfo['og:title'] || urlPreviewInfo['og:site_name'];
- }
+ const embedTitle = urlPreviewInfo['og:title'] || urlPreviewInfo['og:site_name'];
return (
@@ -480,15 +479,9 @@ function Embed({ link }) {
)}
- {urlPreviewInfo['og:image'] != null && urlPreviewInfo['og:image:width'] != null && urlPreviewInfo['og:image:height'] != null && (
-
- )}
+
+ {image}
+
);
diff --git a/src/app/molecules/room-selector/RoomSelector.jsx b/src/app/molecules/room-selector/RoomSelector.jsx
index bf99819d..785e19eb 100644
--- a/src/app/molecules/room-selector/RoomSelector.jsx
+++ b/src/app/molecules/room-selector/RoomSelector.jsx
@@ -70,23 +70,22 @@ function RoomSelector({
isUnread={isUnread}
content={(
<>
- {!settings.showRoomListAvatar && (
-
- )}
- {settings.showRoomListAvatar && (
-
+ {settings.showRoomListAvatar ? (
+
+ ) : (
+
)}
{twemojify(name)}
diff --git a/src/app/organisms/settings/Settings.jsx b/src/app/organisms/settings/Settings.jsx
index ee0e3cf5..b75a499e 100644
--- a/src/app/organisms/settings/Settings.jsx
+++ b/src/app/organisms/settings/Settings.jsx
@@ -91,6 +91,9 @@ function AppearanceSection() {
)}
content={Will show room avatars in the room list.}
/>
+
+
+ URL Previews
{ toggleShowYoutubeEmbedPlayer(); updateState({}); }}
+ disabled={!settings.showUrlPreview}
/>
)}
- content={Will show a youtube embed player for youtube links. (You need to enable url previews for this)}
+ content={Will show a youtube embed player for youtube links.}
/>