2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Show chats list badge only for non-empty calls.

This commit is contained in:
John Preston
2020-12-06 17:28:27 +04:00
parent fa55fd7dd7
commit 732bc38e8e
8 changed files with 38 additions and 12 deletions

View File

@@ -67,7 +67,7 @@ ChannelData::ChannelData(not_null<Data::Session*> owner, PeerId id)
mgInfo = nullptr;
}
}
if (change.diff & MTPDchannel::Flag::f_call_active) {
if (change.diff & MTPDchannel::Flag::f_call_not_empty) {
if (const auto history = this->owner().historyLoaded(this)) {
history->updateChatListEntry();
}
@@ -708,7 +708,8 @@ void ChannelData::clearCall() {
owner().unregisterGroupCall(_call.get());
_call = nullptr;
session().changes().peerUpdated(this, UpdateFlag::GroupCall);
removeFlags(MTPDchannel::Flag::f_call_active);
removeFlags(MTPDchannel::Flag::f_call_active
| MTPDchannel::Flag::f_call_not_empty);
}
namespace Data {