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