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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 9 deletions

View file

@ -10,6 +10,7 @@
- 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 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: 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)

View file

@ -74,14 +74,15 @@ EmotePtr TwitchEmotes::getOrCreateEmote(const EmoteId &id,
if (!shared)
{
(*cache)[id] = shared = std::make_shared<Emote>(
Emote{EmoteName{name},
ImageSet{
Image::fromUrl(getEmoteLink(id, "1.0"), 1),
Image::fromUrl(getEmoteLink(id, "2.0"), 0.5),
Image::fromUrl(getEmoteLink(id, "3.0"), 0.25),
},
Tooltip{name + "<br>Twitch Emote"}, Url{}});
(*cache)[id] = shared = std::make_shared<Emote>(Emote{
EmoteName{name},
ImageSet{
Image::fromUrl(getEmoteLink(id, "1.0"), 1),
Image::fromUrl(getEmoteLink(id, "2.0"), 0.5),
Image::fromUrl(getEmoteLink(id, "3.0"), 0.25),
},
Tooltip{name + "<br>Twitch Emote"},
Url{QString("https://twitchemotes.com/emotes/%1").arg(id.string)}});
}
return shared;

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");
}