mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Added setting to disable auto unshort links.
This commit is contained in:
parent
5f19a57f5a
commit
0d8b5cad63
|
@ -3,6 +3,7 @@
|
||||||
#include "common/Common.hpp"
|
#include "common/Common.hpp"
|
||||||
#include "common/NetworkRequest.hpp"
|
#include "common/NetworkRequest.hpp"
|
||||||
#include "messages/Link.hpp"
|
#include "messages/Link.hpp"
|
||||||
|
#include "singletons/Settings.hpp"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -24,7 +25,9 @@ void LinkResolver::getLinkInfo(const QString url,
|
||||||
QString linkString = url;
|
QString linkString = url;
|
||||||
if (statusCode == 200) {
|
if (statusCode == 200) {
|
||||||
response = root.value("tooltip").toString();
|
response = root.value("tooltip").toString();
|
||||||
linkString = root.value("link").toString();
|
if (getSettings()->enableUnshortLinks) {
|
||||||
|
linkString = root.value("link").toString();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
response = root.value("message").toString();
|
response = root.value("message").toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ public:
|
||||||
/// Links
|
/// Links
|
||||||
BoolSetting linksDoubleClickOnly = {"/links/doubleClickToOpen", false};
|
BoolSetting linksDoubleClickOnly = {"/links/doubleClickToOpen", false};
|
||||||
BoolSetting enableLinkInfoTooltip = {"/links/linkInfoTooltip", false};
|
BoolSetting enableLinkInfoTooltip = {"/links/linkInfoTooltip", false};
|
||||||
|
BoolSetting enableUnshortLinks = {"/links/unshortLinks", false};
|
||||||
BoolSetting enableLowercaseLink = {"/links/linkLowercase", true};
|
BoolSetting enableLowercaseLink = {"/links/linkLowercase", true};
|
||||||
|
|
||||||
/// Ingored Users
|
/// Ingored Users
|
||||||
|
|
|
@ -53,6 +53,9 @@ FeelPage::FeelPage()
|
||||||
form->addRow("",
|
form->addRow("",
|
||||||
this->createCheckBox("Show link info in tooltips",
|
this->createCheckBox("Show link info in tooltips",
|
||||||
getSettings()->enableLinkInfoTooltip));
|
getSettings()->enableLinkInfoTooltip));
|
||||||
|
form->addRow("",
|
||||||
|
this->createCheckBox("Auto unshort links (requires restart)",
|
||||||
|
getSettings()->enableUnshortLinks));
|
||||||
}
|
}
|
||||||
|
|
||||||
layout->addSpacing(16);
|
layout->addSpacing(16);
|
||||||
|
|
Loading…
Reference in a new issue