2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +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

@@ -2217,10 +2217,8 @@ void MainWidget::dialogsToUp() {
_dialogs->jumpToTop();
}
void MainWidget::markActiveHistoryAsRead() {
if (const auto activeHistory = _history->history()) {
session().api().readServerHistory(activeHistory);
}
void MainWidget::checkHistoryActivation() {
_history->checkHistoryActivation();
}
void MainWidget::showAnimated(const QPixmap &bgAnimCache, bool back) {
@@ -3519,15 +3517,8 @@ bool MainWidget::isActive() const {
return !_isIdle && isVisible() && !_a_show.animating();
}
bool MainWidget::doWeReadServerHistory() const {
return isActive()
&& !session().supportMode()
&& !_mainSection
&& _history->doWeReadServerHistory();
}
bool MainWidget::doWeReadMentions() const {
return isActive() && !_mainSection && _history->doWeReadMentions();
bool MainWidget::doWeMarkAsRead() const {
return isActive() && !_mainSection;
}
bool MainWidget::lastWasOnline() const {