Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 28, 2015
2 parents 94d1ea7 + 75a47e9 commit c428008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Telegram/SourceFiles/mainwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/pspecific_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public slots:

void psUpdateDelegate();
void psSavePosition(Qt::WindowState state = Qt::WindowActive);
void psIdleTimeout();
void psShowTrayMenu();

void psMacUndo();
Expand Down

0 comments on commit c428008

Please sign in to comment.