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

Add voice chat indicator in the chats list.

This commit is contained in:
John Preston
2020-12-02 13:52:19 +03:00
parent 00e4ef7701
commit fdbe6bdeb2
15 changed files with 556 additions and 194 deletions

View File

@@ -438,11 +438,12 @@ 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, base::unixtime::now());
}
return false;
bool IsUserOnline(not_null<UserData*> user) {
return OnlineTextActive(user, base::unixtime::now());
}
bool ChannelHasActiveCall(not_null<ChannelData*> channel) {
return (channel->flags() & MTPDchannel::Flag::f_call_active);
}
} // namespace Data