From a2fa1bad6b4ec3cc8dbedaef2a1ae4b513324063 Mon Sep 17 00:00:00 2001 From: ckath Date: Thu, 28 Mar 2019 19:09:09 +0100 Subject: [PATCH] disable requests to resolve link info when its disabled --- src/providers/LinkResolver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/providers/LinkResolver.cpp b/src/providers/LinkResolver.cpp index d7cc3a1f5..33848e019 100644 --- a/src/providers/LinkResolver.cpp +++ b/src/providers/LinkResolver.cpp @@ -12,9 +12,12 @@ namespace chatterino { void LinkResolver::getLinkInfo( const QString url, std::function 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);