2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

min connection timeout 4secs, fixed photo display, thumbs size is less now, update button text and animation added

This commit is contained in:
John Preston
2014-11-18 15:41:33 +03:00
parent d953f894a1
commit 799a81966a
14 changed files with 176 additions and 86 deletions

View File

@@ -165,6 +165,31 @@ namespace App {
return (peer_id & 0x100000000L) ? int32(peer_id & 0xFFFFFFFFL) : 0;
}
int32 onlineForSort(int32 online, int32 now) {
if (online <= 0) {
switch (online) {
case -2: {
QDate yesterday(date(now).date());
yesterday.addDays(-1);
return int32(QDateTime(yesterday).toTime_t());
} break;
case -3: {
QDate weekago(date(now).date());
weekago.addDays(-7);
return int32(QDateTime(weekago).toTime_t());
} break;
case -4: {
QDate monthago(date(now).date());
monthago.addDays(-30);
return int32(QDateTime(monthago).toTime_t());
} break;
}
}
return online;
}
int32 onlineWillChangeIn(int32 online, int32 now) {
if (online <= 0) return 86400;
if (online > now) {