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

Partially implement viewing channel gifts.

This commit is contained in:
John Preston
2025-01-10 18:06:11 +04:00
parent 2fd174ab9c
commit 81001e04e9
15 changed files with 81 additions and 56 deletions

View File

@@ -1532,6 +1532,15 @@ void PeerData::setStoriesState(StoriesState state) {
}
}
int PeerData::peerGiftsCount() const {
if (const auto user = asUser()) {
return user->peerGiftsCount();
} else if (const auto channel = asChannel()) {
return channel->peerGiftsCount();
}
return 0;
}
void PeerData::setIsBlocked(bool is) {
const auto status = is
? BlockStatus::Blocked