fixes #221
This commit is contained in:
@@ -378,10 +378,12 @@ void ChannelView::setChannel(SharedChannel newChannel)
|
|||||||
auto messageRef = new MessageLayout(message);
|
auto messageRef = new MessageLayout(message);
|
||||||
|
|
||||||
if (this->messages.pushBack(MessageLayoutPtr(messageRef), deleted)) {
|
if (this->messages.pushBack(MessageLayoutPtr(messageRef), deleted)) {
|
||||||
if (this->scrollBar.isAtBottom()) {
|
if (!this->paused) {
|
||||||
this->scrollBar.scrollToBottom();
|
if (this->scrollBar.isAtBottom()) {
|
||||||
} else {
|
this->scrollBar.scrollToBottom();
|
||||||
this->scrollBar.offset(-1);
|
} else {
|
||||||
|
this->scrollBar.offset(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,11 +406,13 @@ void ChannelView::setChannel(SharedChannel newChannel)
|
|||||||
messageRefs.at(i) = MessageLayoutPtr(new MessageLayout(messages.at(i)));
|
messageRefs.at(i) = MessageLayoutPtr(new MessageLayout(messages.at(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->messages.pushFront(messageRefs).size() > 0) {
|
if (!this->paused) {
|
||||||
if (this->scrollBar.isAtBottom()) {
|
if (this->messages.pushFront(messageRefs).size() > 0) {
|
||||||
this->scrollBar.scrollToBottom();
|
if (this->scrollBar.isAtBottom()) {
|
||||||
} else {
|
this->scrollBar.scrollToBottom();
|
||||||
this->scrollBar.offset((qreal)messages.size());
|
} else {
|
||||||
|
this->scrollBar.offset((qreal)messages.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user