mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Replaced PeerId with BareId in credits history entries.
This commit is contained in:
parent
dcc52a7333
commit
43cb315f47
3 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue