Skip to content

Commit

Permalink
added messages in mentions tab if correct predicate is met
Browse files Browse the repository at this point in the history
  • Loading branch information
2547techno committed Mar 25, 2023
1 parent 19cc72f commit 83c0045
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Minor: Include normally-stripped mention in replies in logs. (#4420)
- Minor: Added support for FrankerFaceZ animated emotes. (#4434)
- Minor: Added a local backup of the Twitch Badges API in case the request fails. (#4463)
- Minor: Populate "mentions" tab with messages from history (#4475)
- Bugfix: Fixed an issue where animated emotes would render on top of zero-width emotes. (#4314)
- Bugfix: Fixed an issue where it was difficult to hover a zero-width emote. (#4314)
- Bugfix: Fixed an issue where context-menu items for zero-width emotes displayed the wrong provider. (#4460)
Expand Down
15 changes: 15 additions & 0 deletions src/providers/twitch/TwitchChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,21 @@ void TwitchChannel::loadRecentMessages()

tc->addMessagesAtStart(messages);
tc->loadingRecentMessages_.clear();

std::vector<MessagePtr> msgs;
for (MessagePtr msg : messages)
{
const auto highlighted =
msg->flags.has(MessageFlag::Highlighted);
const auto showInMentions =
msg->flags.has(MessageFlag::ShowInMentions);
if (highlighted && showInMentions)
{
msgs.push_back(msg);
}
}

getApp()->getTwitch()->mentionsChannel->fillInMissingMessages(msgs);
},
[weak]() {
auto shared = weak.lock();
Expand Down

0 comments on commit 83c0045

Please sign in to comment.