2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 00:15:42 +00:00

Update API scheme to layer 172.

This commit is contained in:
John Preston
2024-01-09 13:13:30 +04:00
parent c364383cf0
commit ca25ad57b1
16 changed files with 295 additions and 81 deletions

View File

@@ -67,13 +67,13 @@ std::optional<QString> OnlineTextSpecial(not_null<UserData*> user) {
std::optional<QString> OnlineTextCommon(TimeId online, TimeId now) {
if (online <= 0) {
switch (online) {
case 0:
case -1: return tr::lng_status_offline(tr::now);
case -2: return tr::lng_status_recently(tr::now);
case -3: return tr::lng_status_last_week(tr::now);
case -4: return tr::lng_status_last_month(tr::now);
case kOnlineEmpty: return tr::lng_status_offline(tr::now);
case kOnlineRecently: return tr::lng_status_recently(tr::now);
case kOnlineLastWeek: return tr::lng_status_last_week(tr::now);
case kOnlineLastMonth: return tr::lng_status_last_month(tr::now);
case kOnlineHidden: return tr::lng_status_lastseen_hidden(tr::now);
}
return (-online > now)
return IsRecentOnline(online, now)
? tr::lng_status_online(tr::now)
: tr::lng_status_recently(tr::now);
} else if (online > now) {