diff --git a/imports/NeoChat/Component/Timeline/MessageDelegate.qml b/imports/NeoChat/Component/Timeline/MessageDelegate.qml index 1d8b58630..555eb9a99 100644 --- a/imports/NeoChat/Component/Timeline/MessageDelegate.qml +++ b/imports/NeoChat/Component/Timeline/MessageDelegate.qml @@ -31,7 +31,7 @@ TimelineContainer { Layout.fillWidth: true height: active ? item.implicitHeight : 0 active: !currentRoom.usesEncryption && model.display && model.display.includes("http") - visible: active + visible: Config.showLinkPreview && active sourceComponent: LinkPreviewDelegate { anchors.verticalCenter: parent.verticalCenter } diff --git a/imports/NeoChat/Settings/AppearanceSettingsPage.qml b/imports/NeoChat/Settings/AppearanceSettingsPage.qml index b689eaa3f..ef9a62abf 100644 --- a/imports/NeoChat/Settings/AppearanceSettingsPage.qml +++ b/imports/NeoChat/Settings/AppearanceSettingsPage.qml @@ -252,6 +252,14 @@ Kirigami.ScrollablePage { Config.save() } } + QQC2.CheckBox { + text: i18n("Show links preview in the chat messages") + checked: Config.showLinkPreview + onToggled: { + Config.showLinkPreview = checked + Config.save() + } + } } } } diff --git a/src/neochatconfig.kcfg b/src/neochatconfig.kcfg index 2a72dc85e..4c7e923eb 100644 --- a/src/neochatconfig.kcfg +++ b/src/neochatconfig.kcfg @@ -76,6 +76,9 @@ true + + + true