Added links to twitchemotes.com to Twitch emotes' context menus (#2214)

This commit is contained in:
Paweł
2020-11-22 15:54:58 +01:00
committed by GitHub
parent 44262ee2ec
commit 05aab86845
3 changed files with 15 additions and 9 deletions
+1
View File
@@ -10,6 +10,7 @@
- Minor: Added a navigation list to the settings and reordered them. - Minor: Added a navigation list to the settings and reordered them.
- Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083, #2090, #2200) - Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083, #2090, #2200)
- Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001) - Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001)
- Minor: Added a link to twitchemotes.com to conext menu when right-clicking Twitch emotes. (#2214)
- Minor: Improved viewer list window. - Minor: Improved viewer list window.
- Minor: Added emote completion with `:` to the whispers channel (#2075) - Minor: Added emote completion with `:` to the whispers channel (#2075)
- Minor: Made the current channels emotes appear at the top of the emote picker popup. (#2057) - Minor: Made the current channels emotes appear at the top of the emote picker popup. (#2057)
+9 -8
View File
@@ -74,14 +74,15 @@ EmotePtr TwitchEmotes::getOrCreateEmote(const EmoteId &id,
if (!shared) if (!shared)
{ {
(*cache)[id] = shared = std::make_shared<Emote>( (*cache)[id] = shared = std::make_shared<Emote>(Emote{
Emote{EmoteName{name}, EmoteName{name},
ImageSet{ ImageSet{
Image::fromUrl(getEmoteLink(id, "1.0"), 1), Image::fromUrl(getEmoteLink(id, "1.0"), 1),
Image::fromUrl(getEmoteLink(id, "2.0"), 0.5), Image::fromUrl(getEmoteLink(id, "2.0"), 0.5),
Image::fromUrl(getEmoteLink(id, "3.0"), 0.25), Image::fromUrl(getEmoteLink(id, "3.0"), 0.25),
}, },
Tooltip{name + "<br>Twitch Emote"}, Url{}}); Tooltip{name + "<br>Twitch Emote"},
Url{QString("https://twitchemotes.com/emotes/%1").arg(id.string)}});
} }
return shared; return shared;
+5 -1
View File
@@ -103,7 +103,11 @@ namespace {
}); });
}; };
if (creatorFlags.has(MessageElementFlag::BttvEmote)) if (creatorFlags.has(MessageElementFlag::TwitchEmote))
{
addPageLink("TwitchEmotes");
}
else if (creatorFlags.has(MessageElementFlag::BttvEmote))
{ {
addPageLink("BTTV"); addPageLink("BTTV");
} }