fix scroll to bottom issue
This commit is contained in:
@@ -112,7 +112,7 @@ bool ChatWidgetView::layoutMessages()
|
||||
|
||||
_scrollbar.setMaximum(messages.getSize());
|
||||
|
||||
if (showingLatestMessages && showScrollbar) {
|
||||
if (this->showingLatestMessages && showScrollbar) {
|
||||
// If we were showing the latest messages and the scrollbar now wants to be rendered, scroll
|
||||
// to bottom
|
||||
// TODO: Do we want to check if the user is currently moving the scrollbar?
|
||||
|
||||
@@ -96,7 +96,7 @@ void ScrollBar::scrollToBottom()
|
||||
|
||||
bool ScrollBar::isAtBottom() const
|
||||
{
|
||||
return this->getCurrentValue() == this->getMaximum() - this->getLargeChange();
|
||||
return ((this->getMaximum() - this->getLargeChange()) - this->getCurrentValue()) <= 1;
|
||||
}
|
||||
|
||||
void ScrollBar::setMaximum(qreal value)
|
||||
|
||||
Reference in New Issue
Block a user