Clear highlights scrollbar with messages.
This commit is contained in:
@@ -55,6 +55,11 @@ void Scrollbar::unpauseHighlights()
|
|||||||
this->highlightsPaused_ = false;
|
this->highlightsPaused_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Scrollbar::clearHighlights()
|
||||||
|
{
|
||||||
|
this->highlights_.clear();
|
||||||
|
}
|
||||||
|
|
||||||
LimitedQueueSnapshot<ScrollbarHighlight> Scrollbar::getHighlightSnapshot()
|
LimitedQueueSnapshot<ScrollbarHighlight> Scrollbar::getHighlightSnapshot()
|
||||||
{
|
{
|
||||||
if (!this->highlightsPaused_) {
|
if (!this->highlightsPaused_) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public:
|
|||||||
|
|
||||||
void pauseHighlights();
|
void pauseHighlights();
|
||||||
void unpauseHighlights();
|
void unpauseHighlights();
|
||||||
|
void clearHighlights();
|
||||||
|
|
||||||
void scrollToBottom(bool animate = false);
|
void scrollToBottom(bool animate = false);
|
||||||
bool isAtBottom() const;
|
bool isAtBottom() const;
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ void ChannelView::clearMessages()
|
|||||||
{
|
{
|
||||||
// Clear all stored messages in this chat widget
|
// Clear all stored messages in this chat widget
|
||||||
this->messages.clear();
|
this->messages.clear();
|
||||||
|
this->scrollBar_->clearHighlights();
|
||||||
|
|
||||||
// Layout chat widget messages, and force an update regardless if there are
|
// Layout chat widget messages, and force an update regardless if there are
|
||||||
// no messages
|
// no messages
|
||||||
|
|||||||
Reference in New Issue
Block a user