pseudo-online for hidden last-seen done

This commit is contained in:
John Preston
2015-01-23 14:02:45 +03:00
parent bbcca80503
commit da48c2141c
8 changed files with 36 additions and 8 deletions
+5 -1
View File
@@ -2676,7 +2676,11 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
if (user) {
switch (d.vstatus.type()) {
case mtpc_userStatusEmpty: user->onlineTill = 0; break;
case mtpc_userStatusRecently: user->onlineTill = -2; break;
case mtpc_userStatusRecently:
if (user->onlineTill > -10) { // don't modify pseudo-online
user->onlineTill = -2;
}
break;
case mtpc_userStatusLastWeek: user->onlineTill = -3; break;
case mtpc_userStatusLastMonth: user->onlineTill = -4; break;
case mtpc_userStatusOffline: user->onlineTill = d.vstatus.c_userStatusOffline().vwas_online.v; break;