Skip to content
Snippets Groups Projects
Commit dfffe91a authored by Trevor Tabah's avatar Trevor Tabah Committed by Sébastien Blin
Browse files

display links toggle: correct text and variable names

Change-Id: I4e4f1837f2f8ba53b776c4401067f8d7feaa2f76
parent 1934fce8
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ const QString defaultDownloadPath = QStandardPaths::writableLocation(
X(DownloadPath, defaultDownloadPath) \
X(EnableNotifications, true) \
X(EnableTypingIndicator, true) \
X(DisplayImagesChatview, true) \
X(DisplayHyperlinkPreviews, true) \
X(EnableDarkTheme, false) \
X(AutoUpdate, true) \
X(NeverShowMeAgain, false)
......
......@@ -317,7 +317,7 @@ Item {
// ChatviewSettings
property string chatview: qsTr("Chatview")
property string enableTypingIndicator: qsTr("Enable typing indicators")
property string displayImages: qsTr("Display images and videos in the chatview")
property string displayHyperlinkPreviews: qsTr("Display hyperlink previews in the chatview")
// Updates
property string betaInstall: qsTr("Install beta version")
......
......@@ -596,7 +596,7 @@ void
MessagesAdapter::setDisplayLinks()
{
QString s = QString::fromLatin1("setDisplayLinks(%1);")
.arg(settingsManager_->getValue(Settings::Key::DisplayImagesChatview).toBool());
.arg(settingsManager_->getValue(Settings::Key::DisplayHyperlinkPreviews).toBool());
QMetaObject::invokeMethod(qmlObj_, "webViewRunJavaScript", Q_ARG(QVariant, s));
}
......
......@@ -67,15 +67,15 @@ ColumnLayout {
Layout.fillWidth: true
Layout.leftMargin: JamiTheme.preferredMarginSize
checked: SettingsAdapter.getAppValue(Settings.DisplayImagesChatview)
checked: SettingsAdapter.getAppValue(Settings.DisplayHyperlinkPreviews)
labelText: JamiStrings.displayImages
labelText: JamiStrings.displayHyperlinkPreviews
fontPointSize: JamiTheme.settingsFontSize
tooltipText: JamiStrings.displayImages
tooltipText: JamiStrings.displayHyperlinkPreviews
onSwitchToggled: {
SettingsAdapter.setAppValue(Settings.Key.DisplayImagesChatview, checked)
SettingsAdapter.setAppValue(Settings.Key.DisplayHyperlinkPreviews, checked)
MessagesAdapter.setDisplayLinks()
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment