From db233ffbdc7aac6d7fa21a6a88e714cc8fdab88c Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 4 Jun 2018 14:52:21 +0200 Subject: [PATCH] fixed copying 3x versions of bttv channel emotes --- src/singletons/emotemanager.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/singletons/emotemanager.cpp b/src/singletons/emotemanager.cpp index ca18458f5..5a53caf6f 100644 --- a/src/singletons/emotemanager.cpp +++ b/src/singletons/emotemanager.cpp @@ -133,11 +133,14 @@ void EmoteManager::reloadBTTVChannelEmotes(const QString &channelName, QString link = linkTemplate; link.detach(); - link = link.replace("{{id}}", id).replace("{{image}}", "1x"); - - auto emote = this->getBTTVChannelEmoteFromCaches().getOrAdd(id, [&id, &code, &link] { - util::EmoteData emoteData( - new Image(link, 1, code, code + "
Channel BTTV Emote")); + auto emote = this->getBTTVChannelEmoteFromCaches().getOrAdd(id, [&] { + util::EmoteData emoteData; + emoteData.image1x = new Image(link.replace("{{id}}", id).replace("{{image}}", "1x"), + 1, code, code + "
Channel BTTV Emote"); + emoteData.image2x = new Image(link.replace("{{id}}", id).replace("{{image}}", "2x"), + 0.5, code, code + "
Channel BTTV Emote"); + emoteData.image3x = new Image(link.replace("{{id}}", id).replace("{{image}}", "3x"), + 0.25, code, code + "
Channel BTTV Emote"); emoteData.pageLink = "https://manage.betterttv.net/emotes/" + id; return emoteData;