Add support for non-highlight channel point rewards (#1809)
This commit is contained in:
@@ -169,7 +169,7 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags flags)
|
||||
// Painting
|
||||
void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
|
||||
Selection &selection, bool isLastReadMessage,
|
||||
bool isWindowFocused)
|
||||
bool isWindowFocused, bool isMentions)
|
||||
{
|
||||
auto app = getApp();
|
||||
QPixmap *pixmap = this->buffer_.get();
|
||||
@@ -220,6 +220,14 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
|
||||
app->themes->messages.disabled);
|
||||
}
|
||||
|
||||
if (!isMentions &&
|
||||
this->message_->flags.has(MessageFlag::RedeemedChannelPointReward))
|
||||
{
|
||||
painter.fillRect(
|
||||
0, y, this->scale_ * 4, pixmap->height(),
|
||||
*ColorProvider::instance().color(ColorType::Subscription));
|
||||
}
|
||||
|
||||
// draw selection
|
||||
if (!selection.isEmpty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user