mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Merge branch 'master' of https://github.com/telegramdesktop/tdesktop
This commit is contained in:
@@ -2449,7 +2449,8 @@ void MainWidget::updateOnline(bool gotOtherOffline) {
|
||||
int updateIn = cOnlineUpdatePeriod();
|
||||
if (isOnline) {
|
||||
uint64 idle = psIdleTime();
|
||||
if (idle >= cOfflineIdleTimeout()) {
|
||||
LOG(("Idle: %1").arg(idle));
|
||||
if (idle >= uint64(cOfflineIdleTimeout())) {
|
||||
isOnline = false;
|
||||
if (!_isIdle) {
|
||||
_isIdle = true;
|
||||
@@ -2476,13 +2477,14 @@ void MainWidget::updateOnline(bool gotOtherOffline) {
|
||||
|
||||
updateOnlineDisplay();
|
||||
} else if (isOnline) {
|
||||
updateIn = _lastSetOnline + cOnlineUpdatePeriod() - ms;
|
||||
updateIn = qMin(updateIn, int(_lastSetOnline + cOnlineUpdatePeriod() - ms));
|
||||
}
|
||||
LOG(("UPDATE IN: %1").arg(updateIn));
|
||||
_onlineTimer.start(updateIn);
|
||||
}
|
||||
|
||||
void MainWidget::checkIdleFinish() {
|
||||
if (psIdleTime() < cOfflineIdleTimeout()) {
|
||||
if (psIdleTime() < uint64(cOfflineIdleTimeout())) {
|
||||
_idleFinishTimer.stop();
|
||||
_isIdle = false;
|
||||
updateOnline();
|
||||
|
Reference in New Issue
Block a user