2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Respect window active state on mark as read.

This commit is contained in:
John Preston
2022-11-02 20:03:42 +04:00
parent ff352d7647
commit 9d4840c0de
23 changed files with 156 additions and 107 deletions

View File

@@ -2060,8 +2060,11 @@ void MainWidget::dialogsToUp() {
}
}
void MainWidget::checkHistoryActivation() {
_history->checkHistoryActivation();
void MainWidget::checkActivation() {
_history->checkActivation();
if (_mainSection) {
_mainSection->checkActivation();
}
}
void MainWidget::showAnimated(const QPixmap &bgAnimCache, bool back) {
@@ -2223,7 +2226,7 @@ void MainWidget::showAll() {
updateControlsGeometry();
floatPlayerCheckVisibility();
_controller->widget()->checkHistoryActivation();
_controller->widget()->checkActivation();
}
void MainWidget::resizeEvent(QResizeEvent *e) {
@@ -2778,14 +2781,8 @@ void MainWidget::activate() {
_controller->widget()->fixOrder();
}
bool MainWidget::isActive() const {
return isVisible()
&& !_a_show.animating()
&& !session().updates().isIdle();
}
bool MainWidget::doWeMarkAsRead() const {
return isActive() && !_mainSection;
bool MainWidget::animatingShow() const {
return _a_show.animating();
}
bool MainWidget::isOneColumn() const {