Made the current channels emotes appear at the top of the emote picker (#2057)
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unversioned
|
## 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 viewer list button to twitch channel header. (#1978)
|
||||||
- Minor: Added followage and subage information to usercard. (#2023)
|
- 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)
|
- 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)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
void addEmoteSets(
|
void addEmoteSets(
|
||||||
std::vector<std::shared_ptr<TwitchAccount::EmoteSet>> sets,
|
std::vector<std::shared_ptr<TwitchAccount::EmoteSet>> sets,
|
||||||
Channel &globalChannel, Channel &subChannel)
|
Channel &globalChannel, Channel &subChannel, QString currentChannelName)
|
||||||
{
|
{
|
||||||
QMap<QString, QPair<bool, std::vector<MessagePtr>>> mapOfSets;
|
QMap<QString, QPair<bool, std::vector<MessagePtr>>> mapOfSets;
|
||||||
|
|
||||||
@@ -100,6 +100,14 @@ namespace {
|
|||||||
|
|
||||||
// Output to channel all created messages,
|
// Output to channel all created messages,
|
||||||
// That contain title or emotes.
|
// 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)
|
foreach (auto pair, mapOfSets)
|
||||||
{
|
{
|
||||||
auto &channel = pair.first ? globalChannel : subChannel;
|
auto &channel = pair.first ? globalChannel : subChannel;
|
||||||
@@ -174,7 +182,7 @@ void EmotePopup::loadChannel(ChannelPtr _channel)
|
|||||||
// twitch
|
// twitch
|
||||||
addEmoteSets(
|
addEmoteSets(
|
||||||
getApp()->accounts->twitch.getCurrent()->accessEmotes()->emoteSets,
|
getApp()->accounts->twitch.getCurrent()->accessEmotes()->emoteSets,
|
||||||
*globalChannel, *subChannel);
|
*globalChannel, *subChannel, _channel->getName());
|
||||||
|
|
||||||
// global
|
// global
|
||||||
addEmotes(*globalChannel, *twitchChannel->globalBttv().emotes(),
|
addEmotes(*globalChannel, *twitchChannel->globalBttv().emotes(),
|
||||||
|
|||||||
Reference in New Issue
Block a user