Add support for non-highlight channel point rewards (#1809)

This commit is contained in:
Jonas Schmitt
2020-08-08 15:37:22 +02:00
committed by GitHub
parent 1bd3d10eef
commit 11b8948290
23 changed files with 498 additions and 25 deletions
+5 -1
View File
@@ -856,6 +856,7 @@ MessageElementFlags ChannelView::getFlags() const
if (this->channel_ == app->twitch.server->mentionsChannel)
{
flags.set(MessageElementFlag::ChannelName);
flags.unset(MessageElementFlag::ChannelPointReward);
}
}
@@ -902,6 +903,9 @@ void ChannelView::drawMessages(QPainter &painter)
MessageLayout *end = nullptr;
bool windowFocused = this->window() == QApplication::activeWindow();
auto app = getApp();
bool isMentions = this->channel_ == app->twitch.server->mentionsChannel;
for (size_t i = start; i < messagesSnapshot.size(); ++i)
{
MessageLayout *layout = messagesSnapshot[i].get();
@@ -913,7 +917,7 @@ void ChannelView::drawMessages(QPainter &painter)
}
layout->paint(painter, DRAW_WIDTH, y, i, this->selection_,
isLastMessage, windowFocused);
isLastMessage, windowFocused, isMentions);
y += layout->getHeight();