2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Track dialog row offline status by timer.

Fixes #6410.
This commit is contained in:
John Preston
2022-10-24 11:22:26 +04:00
parent 0cba9e4a22
commit ed895ace66
10 changed files with 104 additions and 26 deletions

View File

@@ -460,8 +460,11 @@ bool OnlineTextActive(not_null<UserData*> user, TimeId now) {
return OnlineTextActive(user->onlineTill, now);
}
bool IsUserOnline(not_null<UserData*> user) {
return OnlineTextActive(user, base::unixtime::now());
bool IsUserOnline(not_null<UserData*> user, TimeId now) {
if (!now) {
now = base::unixtime::now();
}
return OnlineTextActive(user, now);
}
bool ChannelHasActiveCall(not_null<ChannelData*> channel) {