Replaced PeerId with BareId in credits history entries.

This commit is contained in:
23rd
2024-05-23 17:55:33 +03:00
committed by John Preston
parent dcc52a7333
commit 43cb315f47
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -39,11 +39,11 @@ namespace {
}, [](const MTPDstarsTransactionPeerPremiumBot &) {
return Data::CreditsHistoryEntry::PeerType::PremiumBot;
}),
.peerId = tl.data().vpeer().match([](const HistoryPeerTL &p) {
.bareId = tl.data().vpeer().match([](const HistoryPeerTL &p) {
return peerFromMTP(p.vpeer());
}, [](const auto &) {
return PeerId(0);
}),
}).value,
};
}
+1 -1
View File
@@ -32,7 +32,7 @@ struct CreditsHistoryEntry final {
uint64 credits = 0;
QDateTime date;
PeerType peerType;
PeerId peerId = PeerId(0);
uint64 bareId = 0;
};
struct CreditsStatusSlice final {
@@ -908,8 +908,8 @@ void CreditsController::applySlice(const Data::CreditsStatusSlice &slice) {
.creditIcon = _creditIcon,
.rowHeight = computeListSt().item.height,
};
if (item.peerId) {
const auto peer = session().data().peer(item.peerId);
if (item.bareId) {
const auto peer = session().data().peer(PeerId(item.bareId));
return std::make_unique<CreditsRow>(peer, descriptor);
} else {
return std::make_unique<CreditsRow>(descriptor);