2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +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

@@ -686,7 +686,11 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
} else {
channel->setUnavailableReasons({});
}
channel->setFlags(data.vflags().v);
const auto callFlag = MTPDchannel::Flag::f_call_not_empty;
const auto callNotEmpty = (data.vflags().v & callFlag)
|| (channel->call() && channel->call()->fullCount() > 0);
channel->setFlags(data.vflags().v
| (callNotEmpty ? callFlag : MTPDchannel::Flag(0)));
//if (const auto feedId = data.vfeed_id()) { // #feed
// channel->setFeed(feed(feedId->v));
//} else {