Added emote completion with : to the whispers channel (#2076)

This commit is contained in:
yodax
2020-10-17 09:59:15 -04:00
committed by GitHub
parent fb6b65faaa
commit 55b98f93db
3 changed files with 19 additions and 12 deletions
+15 -11
View File
@@ -72,8 +72,9 @@ void EmoteInputPopup::initLayout()
void EmoteInputPopup::updateEmotes(const QString &text, ChannelPtr channel)
{
std::vector<_Emote> emotes;
if (auto tc = dynamic_cast<TwitchChannel *>(channel.get()))
auto tc = dynamic_cast<TwitchChannel *>(channel.get());
auto wc = channel.get()->getType() == Channel::Type::TwitchWhispers;
if (tc || wc)
{
if (auto user = getApp()->accounts->twitch.getCurrent())
{
@@ -81,16 +82,19 @@ void EmoteInputPopup::updateEmotes(const QString &text, ChannelPtr channel)
addEmotes(emotes, twitch->emotes, text, "Twitch Emote");
}
// TODO extract "Channel BetterTTV" text into a #define.
if (auto bttv = tc->bttvEmotes())
addEmotes(emotes, *bttv, text, "Channel BetterTTV");
if (auto ffz = tc->ffzEmotes())
addEmotes(emotes, *ffz, text, "Channel FrankerFaceZ");
if (tc)
{
// TODO extract "Channel BetterTTV" text into a #define.
if (auto bttv = tc->bttvEmotes())
addEmotes(emotes, *bttv, text, "Channel BetterTTV");
if (auto ffz = tc->ffzEmotes())
addEmotes(emotes, *ffz, text, "Channel FrankerFaceZ");
if (auto bttvG = tc->globalBttv().emotes())
addEmotes(emotes, *bttvG, text, "Global BetterTTV");
if (auto ffzG = tc->globalFfz().emotes())
addEmotes(emotes, *ffzG, text, "Global FrankerFaceZ");
if (auto bttvG = tc->globalBttv().emotes())
addEmotes(emotes, *bttvG, text, "Global BetterTTV");
if (auto ffzG = tc->globalFfz().emotes())
addEmotes(emotes, *ffzG, text, "Global FrankerFaceZ");
}
addEmojis(emotes, getApp()->emotes->emojis.emojis, text);
}