2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Optimize online dots + add animations.

This commit is contained in:
John Preston
2019-06-17 16:37:29 +02:00
parent 61c66994a2
commit d0b86e1229
12 changed files with 306 additions and 130 deletions

View File

@@ -366,4 +366,11 @@ bool OnlineTextActive(not_null<UserData*> user, TimeId now) {
return OnlineTextActive(user->onlineTill, now);
}
bool IsPeerAnOnlineUser(not_null<PeerData*> peer) {
if (const auto user = peer->asUser()) {
return OnlineTextActive(user, unixtime());
}
return false;
}
} // namespace Data