2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

First version of reading-while-scrolling.

This commit is contained in:
John Preston
2020-02-11 15:23:51 +04:00
parent db2aa7000a
commit 70408f0e22
12 changed files with 238 additions and 113 deletions

View File

@@ -503,23 +503,17 @@ void MainWindow::themeUpdated(const Window::Theme::BackgroundUpdate &data) {
}
}
bool MainWindow::doWeReadServerHistory() {
bool MainWindow::doWeMarkAsRead() {
if (!_main || Ui::isLayerShown()) {
return false;
}
updateIsActive(0);
return isActive()
&& !Ui::isLayerShown()
&& (_main ? _main->doWeReadServerHistory() : false);
}
bool MainWindow::doWeReadMentions() {
updateIsActive(0);
return isActive()
&& !Ui::isLayerShown()
&& (_main ? _main->doWeReadMentions() : false);
return isActive();
}
void MainWindow::checkHistoryActivation() {
if (doWeReadServerHistory()) {
_main->markActiveHistoryAsRead();
if (_main) {
_main->checkHistoryActivation();
}
}