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:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user