Merge pull request #697 from 23rd/patch-9-clear-highlights-scroll

Clear highlights scrollbar with messages.
This commit is contained in:
pajlada 2018-09-02 22:33:38 +02:00 committed by GitHub
commit 12670e51b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View file

@ -55,6 +55,11 @@ void Scrollbar::unpauseHighlights()
this->highlightsPaused_ = false;
}
void Scrollbar::clearHighlights()
{
this->highlights_.clear();
}
LimitedQueueSnapshot<ScrollbarHighlight> Scrollbar::getHighlightSnapshot()
{
if (!this->highlightsPaused_) {

View file

@ -27,6 +27,7 @@ public:
void pauseHighlights();
void unpauseHighlights();
void clearHighlights();
void scrollToBottom(bool animate = false);
bool isAtBottom() const;

View file

@ -304,6 +304,7 @@ void ChannelView::clearMessages()
{
// Clear all stored messages in this chat widget
this->messages.clear();
this->scrollBar_->clearHighlights();
// Layout chat widget messages, and force an update regardless if there are
// no messages