Skip to content

Commit

Permalink
Auto-completion for 7TV Emotes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM committed May 26, 2021
1 parent 4cb5d48 commit 05638c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/common/CompletionModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ void CompletionModel::refresh(const QString &prefix, bool isFirstWord)
}
}

// 7TV Global
for (auto &emote : *channel->globalSeventv().emotes()) {
addString(emote.first.string, TaggedString::Type::SEVENTVGlobalEmote);
}

// Bttv Global
for (auto &emote : *channel->globalBttv().emotes())
{
Expand All @@ -148,6 +153,11 @@ void CompletionModel::refresh(const QString &prefix, bool isFirstWord)
addString(emote.first.string, TaggedString::Type::FFZChannelEmote);
}

// 7TV Channel
for (auto &emote : *channel->seventvEmotes()) {
addString(emote.first.string, TaggedString::Type::SEVENTVChannelEmote);
}

// Bttv Channel
for (auto &emote : *channel->bttvEmotes())
{
Expand Down
2 changes: 2 additions & 0 deletions src/common/CompletionModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class CompletionModel : public QAbstractListModel
EmoteStart,
FFZGlobalEmote,
FFZChannelEmote,
SEVENTVGlobalEmote,
SEVENTVChannelEmote,
BTTVGlobalEmote,
BTTVChannelEmote,
TwitchGlobalEmote,
Expand Down

0 comments on commit 05638c1

Please sign in to comment.