mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Store the "showing latest messages" in a variable for later use
This commit is contained in:
parent
814fc4bbae
commit
edcea52cc6
|
@ -63,10 +63,7 @@ bool ChatWidgetView::layoutMessages()
|
|||
// True if one of the following statements are true:
|
||||
// The scrollbar was not visible
|
||||
// The scrollbar was visible and at the bottom
|
||||
bool showingLatestMessages = false;
|
||||
if (this->_scrollbar.isAtBottom() || !this->_scrollbar.isVisible()) {
|
||||
showingLatestMessages = true;
|
||||
}
|
||||
this->showingLatestMessages = this->_scrollbar.isAtBottom() || !this->_scrollbar.isVisible();
|
||||
|
||||
int start = _scrollbar.getCurrentValue();
|
||||
int layoutWidth = _scrollbar.isVisible() ? width() - _scrollbar.width() : width();
|
||||
|
|
|
@ -52,6 +52,10 @@ private:
|
|||
|
||||
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;
|
||||
bool _onlyUpdateEmotes;
|
||||
|
||||
|
|
Loading…
Reference in a new issue