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/NetworkRequest.hpp"
|
||||
#include "messages/Link.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
@ -24,7 +25,9 @@ void LinkResolver::getLinkInfo(const QString url,
|
|||
QString linkString = url;
|
||||
if (statusCode == 200) {
|
||||
response = root.value("tooltip").toString();
|
||||
linkString = root.value("link").toString();
|
||||
if (getSettings()->enableUnshortLinks) {
|
||||
linkString = root.value("link").toString();
|
||||
}
|
||||
} else {
|
||||
response = root.value("message").toString();
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ public:
|
|||
/// Links
|
||||
BoolSetting linksDoubleClickOnly = {"/links/doubleClickToOpen", false};
|
||||
BoolSetting enableLinkInfoTooltip = {"/links/linkInfoTooltip", false};
|
||||
BoolSetting enableUnshortLinks = {"/links/unshortLinks", false};
|
||||
BoolSetting enableLowercaseLink = {"/links/linkLowercase", true};
|
||||
|
||||
/// Ingored Users
|
||||
|
|
|
@ -53,6 +53,9 @@ FeelPage::FeelPage()
|
|||
form->addRow("",
|
||||
this->createCheckBox("Show link info in tooltips",
|
||||
getSettings()->enableLinkInfoTooltip));
|
||||
form->addRow("",
|
||||
this->createCheckBox("Auto unshort links (requires restart)",
|
||||
getSettings()->enableUnshortLinks));
|
||||
}
|
||||
|
||||
layout->addSpacing(16);
|
||||
|
|
Loading…
Reference in a new issue