Fixes #53 last read message indicator
This commit is contained in:
+22
-1
@@ -107,7 +107,7 @@ void Window::repaintVisibleChatWidgets(Channel *channel)
|
||||
return;
|
||||
}
|
||||
|
||||
const std::vector<Split *> &widgets = page->getChatWidgets();
|
||||
const std::vector<Split *> &widgets = page->getSplits();
|
||||
|
||||
for (auto it = widgets.begin(); it != widgets.end(); ++it) {
|
||||
Split *widget = *it;
|
||||
@@ -140,6 +140,27 @@ void Window::closeEvent(QCloseEvent *)
|
||||
this->closed();
|
||||
}
|
||||
|
||||
bool Window::event(QEvent *e)
|
||||
{
|
||||
switch (e->type()) {
|
||||
case QEvent::WindowActivate:
|
||||
break;
|
||||
|
||||
case QEvent::WindowDeactivate: {
|
||||
auto page = this->notebook.getSelectedPage();
|
||||
|
||||
if (page != nullptr) {
|
||||
std::vector<Split *> splits = page->getSplits();
|
||||
|
||||
for (Split *split : splits) {
|
||||
split->updateLastReadMessage();
|
||||
}
|
||||
}
|
||||
} break;
|
||||
};
|
||||
return BaseWindow::event(e);
|
||||
}
|
||||
|
||||
void Window::loadGeometry()
|
||||
{
|
||||
bool doSetGeometry = false;
|
||||
|
||||
Reference in New Issue
Block a user