Split community chats by can_view_history flag

This commit is contained in:
John Preston
2026-06-23 22:50:09 +04:00
parent cf76a38638
commit 36958a6782
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -92,7 +92,7 @@ constexpr auto kShowChatNamesCount = 20;
} // namespace
bool IsCommunityChatViewable(const CommunityLinkedPeer &linked) {
return (linked.visible == true);
return linked.canViewHistory;
}
CommunityInfo::CommunityInfo(not_null<ChannelData*> channel)
@@ -129,6 +129,7 @@ void CommunityInfo::applyLinkedPeers(const QVector<MTPCommunityPeer> &list) {
now.push_back({
.peer = owner.peer(peerFromMTP(data.vpeer())),
.visible = visible,
.canViewHistory = data.is_can_view_history(),
});
}
if (_linkedPeers == now) {