mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 &) {
|
}, [](const MTPDstarsTransactionPeerPremiumBot &) {
|
||||||
return Data::CreditsHistoryEntry::PeerType::PremiumBot;
|
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());
|
return peerFromMTP(p.vpeer());
|
||||||
}, [](const auto &) {
|
}, [](const auto &) {
|
||||||
return PeerId(0);
|
return PeerId(0);
|
||||||
}),
|
}).value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct CreditsHistoryEntry final {
|
||||||
uint64 credits = 0;
|
uint64 credits = 0;
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
PeerType peerType;
|
PeerType peerType;
|
||||||
PeerId peerId = PeerId(0);
|
uint64 bareId = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CreditsStatusSlice final {
|
struct CreditsStatusSlice final {
|
||||||
|
|
|
@ -908,8 +908,8 @@ void CreditsController::applySlice(const Data::CreditsStatusSlice &slice) {
|
||||||
.creditIcon = _creditIcon,
|
.creditIcon = _creditIcon,
|
||||||
.rowHeight = computeListSt().item.height,
|
.rowHeight = computeListSt().item.height,
|
||||||
};
|
};
|
||||||
if (item.peerId) {
|
if (item.bareId) {
|
||||||
const auto peer = session().data().peer(item.peerId);
|
const auto peer = session().data().peer(PeerId(item.bareId));
|
||||||
return std::make_unique<CreditsRow>(peer, descriptor);
|
return std::make_unique<CreditsRow>(peer, descriptor);
|
||||||
} else {
|
} else {
|
||||||
return std::make_unique<CreditsRow>(descriptor);
|
return std::make_unique<CreditsRow>(descriptor);
|
||||||
|
|
Loading…
Add table
Reference in a new issue