2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

Beta version 4.5.4: Mark-as-read-inactive setting.

In case an experimental setting of auto-scrolling is enabled,
just ignore the window activity check in marking chat as read..
This commit is contained in:
John Preston
2023-01-10 15:31:10 +04:00
parent 2efe409c60
commit 3c17fab15a
2 changed files with 9 additions and 12 deletions

View File

@@ -76,6 +76,13 @@ void FeedLangTestingKey(int key) {
}
}
base::options::toggle AutoScrollInactiveChat({
.id = kOptionAutoScrollInactiveChat,
.name = "Mark as read of inactive chat",
.description = "Mark new messages as read and scroll the chat "
"even when the window is not in focus.",
});
} // namespace
MainWindow::MainWindow(not_null<Window::Controller*> controller)
@@ -538,8 +545,8 @@ bool MainWindow::markingAsRead() const {
&& !_main->isHidden()
&& !_main->animatingShow()
&& !_layer
&& isActive()
&& !_main->session().updates().isIdle();
&& (AutoScrollInactiveChat().value()
|| (isActive() && !_main->session().updates().isIdle()));
}
void MainWindow::checkActivation() {