Store the "showing latest messages" in a variable for later use
This commit is contained in:
@@ -63,10 +63,7 @@ bool ChatWidgetView::layoutMessages()
|
|||||||
// True if one of the following statements are true:
|
// True if one of the following statements are true:
|
||||||
// The scrollbar was not visible
|
// The scrollbar was not visible
|
||||||
// The scrollbar was visible and at the bottom
|
// The scrollbar was visible and at the bottom
|
||||||
bool showingLatestMessages = false;
|
this->showingLatestMessages = this->_scrollbar.isAtBottom() || !this->_scrollbar.isVisible();
|
||||||
if (this->_scrollbar.isAtBottom() || !this->_scrollbar.isVisible()) {
|
|
||||||
showingLatestMessages = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int start = _scrollbar.getCurrentValue();
|
int start = _scrollbar.getCurrentValue();
|
||||||
int layoutWidth = _scrollbar.isVisible() ? width() - _scrollbar.width() : width();
|
int layoutWidth = _scrollbar.isVisible() ? width() - _scrollbar.width() : width();
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ private:
|
|||||||
|
|
||||||
ScrollBar _scrollbar;
|
ScrollBar _scrollbar;
|
||||||
|
|
||||||
|
// This variable can be used to decide whether or not we should render the "Show latest
|
||||||
|
// messages" button
|
||||||
|
bool showingLatestMessages = true;
|
||||||
|
|
||||||
AccountPopupWidget _userPopupWidget;
|
AccountPopupWidget _userPopupWidget;
|
||||||
bool _onlyUpdateEmotes;
|
bool _onlyUpdateEmotes;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user