improve "last message read" indicator (#802)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "widgets/helper/NotebookButton.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/helper/Shortcut.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
@@ -490,4 +491,17 @@ SplitContainer *SplitNotebook::getOrAddSelectedPage()
|
||||
: this->addPage();
|
||||
}
|
||||
|
||||
void SplitNotebook::select(QWidget *page)
|
||||
{
|
||||
if (auto selectedPage = this->getSelectedPage()) {
|
||||
if (auto splitContainer =
|
||||
dynamic_cast<SplitContainer *>(selectedPage)) {
|
||||
for (auto split : splitContainer->getSplits()) {
|
||||
split->updateLastReadMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
this->Notebook::select(page);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user