2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Fix stop-auto-read when the system is idle.

This commit is contained in:
John Preston
2020-02-19 20:54:19 +04:00
parent 5b7f7ed70e
commit b5dcd84513
4 changed files with 11 additions and 4 deletions

View File

@@ -508,7 +508,7 @@ bool MainWindow::doWeMarkAsRead() {
return false;
}
updateIsActive(0);
return isActive();
return isActive() && _main->doWeMarkAsRead();
}
void MainWindow::checkHistoryActivation() {
@@ -549,10 +549,12 @@ bool MainWindow::eventFilter(QObject *object, QEvent *e) {
} break;
case QEvent::MouseMove: {
if (_main && _main->isIdle()) {
const auto position = static_cast<QMouseEvent*>(e)->globalPos();
if (_main && _main->isIdle() && _lastMousePosition != position) {
Core::App().updateNonIdle();
_main->checkIdleFinish();
}
_lastMousePosition = position;
} break;
case QEvent::MouseButtonRelease: {