diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ec712b..7e531d4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unversioned +- Minor: Made the current channels emotes appear at the top of the emote picker popup. - Minor: Added viewer list button to twitch channel header. (#1978) - Minor: Added followage and subage information to usercard. (#2023) - Minor: Added an option to only open channels specified in command line with `-c` parameter. You can also use `--help` to display short help message (#1940) diff --git a/src/widgets/dialogs/EmotePopup.cpp b/src/widgets/dialogs/EmotePopup.cpp index 125ebf61..ca4564d8 100644 --- a/src/widgets/dialogs/EmotePopup.cpp +++ b/src/widgets/dialogs/EmotePopup.cpp @@ -61,7 +61,7 @@ namespace { } void addEmoteSets( std::vector> sets, - Channel &globalChannel, Channel &subChannel) + Channel &globalChannel, Channel &subChannel, QString currentChannelName) { QMap>> mapOfSets; @@ -100,6 +100,14 @@ namespace { // Output to channel all created messages, // That contain title or emotes. + // Put current channel emotes at the top + auto currentChannelPair = mapOfSets[currentChannelName]; + for (auto message : currentChannelPair.second) + { + subChannel.addMessage(message); + } + mapOfSets.remove(currentChannelName); + foreach (auto pair, mapOfSets) { auto &channel = pair.first ? globalChannel : subChannel; @@ -174,7 +182,7 @@ void EmotePopup::loadChannel(ChannelPtr _channel) // twitch addEmoteSets( getApp()->accounts->twitch.getCurrent()->accessEmotes()->emoteSets, - *globalChannel, *subChannel); + *globalChannel, *subChannel, _channel->getName()); // global addEmotes(*globalChannel, *twitchChannel->globalBttv().emotes(),