disable requests to resolve link info when its disabled

This commit is contained in:
ckath 2019-03-28 19:09:09 +01:00 committed by pajlada
parent fac1a6d00c
commit a2fa1bad6b

View file

@ -12,9 +12,12 @@ namespace chatterino {
void LinkResolver::getLinkInfo(
const QString url, std::function<void(QString, Link)> successCallback)
{
if (!getSettings()->linkInfoTooltip) {
successCallback("No link info loaded", Link(Link::Url, url));
return;
}
QString requestUrl("https://braize.pajlada.com/chatterino/link_resolver/" +
QUrl::toPercentEncoding(url, "", "/:"));
// Uncomment to test crashes
// QTimer::singleShot(3000, [=]() {
NetworkRequest request(requestUrl);