mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Replaced PeerId with BareId in credits history entries.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user