added basic alternating messages backgrounds

This commit is contained in:
fourtf
2018-05-06 14:38:23 +02:00
parent 12766f3b60
commit 34a58021bc
9 changed files with 49 additions and 26 deletions
+5
View File
@@ -356,6 +356,11 @@ void ChannelView::setChannel(ChannelPtr newChannel)
auto messageRef = new MessageLayout(message);
if (this->lastMessageHasAlternateBackground) {
messageRef->flags |= MessageLayout::AlternateBackground;
}
this->lastMessageHasAlternateBackground = !this->lastMessageHasAlternateBackground;
if (this->messages.pushBack(MessageLayoutPtr(messageRef), deleted)) {
if (!this->paused) {
if (this->scrollBar.isAtBottom()) {