mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
added caching for bttv and ffz api requests
This commit is contained in:
parent
e32841ab81
commit
107dc398a8
2 changed files with 3 additions and 0 deletions
|
@ -65,6 +65,7 @@ void BTTVEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr<uti
|
|||
util::NetworkRequest req(url);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.setTimeout(3000);
|
||||
req.setUseQuickLoadCache(true);
|
||||
req.getJSON([this, channelName, _map](QJsonObject &rootNode) {
|
||||
auto map = _map.lock();
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ void FFZEmotes::loadGlobalEmotes()
|
|||
util::NetworkRequest req(url);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.setTimeout(30000);
|
||||
req.setUseQuickLoadCache(true);
|
||||
req.getJSON([this](QJsonObject &root) {
|
||||
auto sets = root.value("sets").toObject();
|
||||
|
||||
|
@ -88,6 +89,7 @@ void FFZEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr<util
|
|||
util::NetworkRequest req(url);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.setTimeout(3000);
|
||||
req.setUseQuickLoadCache(true);
|
||||
req.getJSON([this, channelName, _map](QJsonObject &rootNode) {
|
||||
auto map = _map.lock();
|
||||
|
||||
|
|
Loading…
Reference in a new issue