mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use getters in MTP classes.
This commit is contained in:
@@ -450,7 +450,7 @@ void ChatBackground::checkUploadWallPaper() {
|
||||
result.match([&](const MTPDwallPaper &data) {
|
||||
_session->data().documentConvert(
|
||||
_session->data().document(documentId),
|
||||
data.vdocument);
|
||||
data.vdocument());
|
||||
});
|
||||
if (const auto paper = Data::WallPaper::Create(result)) {
|
||||
setPaper(*paper);
|
||||
|
@@ -172,14 +172,13 @@ void PasscodeLockWidget::setInnerFocus() {
|
||||
}
|
||||
|
||||
TermsLock TermsLock::FromMTP(const MTPDhelp_termsOfService &data) {
|
||||
const auto minAge = data.vmin_age_confirm();
|
||||
return {
|
||||
bytes::make_vector(data.vid.c_dataJSON().vdata.v),
|
||||
bytes::make_vector(data.vid().c_dataJSON().vdata().v),
|
||||
TextWithEntities {
|
||||
TextUtilities::Clean(qs(data.vtext)),
|
||||
TextUtilities::EntitiesFromMTP(data.ventities.v) },
|
||||
(data.has_min_age_confirm()
|
||||
? base::make_optional(data.vmin_age_confirm.v)
|
||||
: std::nullopt),
|
||||
TextUtilities::Clean(qs(data.vtext())),
|
||||
TextUtilities::EntitiesFromMTP(data.ventities().v) },
|
||||
(minAge ? std::make_optional(minAge->v) : std::nullopt),
|
||||
data.is_popup()
|
||||
};
|
||||
}
|
||||
|
@@ -841,7 +841,7 @@ void PeerMenuAddChannelMembers(not_null<ChannelData*> channel) {
|
||||
list
|
||||
) | ranges::view::transform([](const MTPChannelParticipant &p) {
|
||||
return p.match([](const auto &data) {
|
||||
return data.vuser_id.v;
|
||||
return data.vuser_id().v;
|
||||
});
|
||||
}) | ranges::view::transform([](UserId userId) {
|
||||
return Auth().data().userLoaded(userId);
|
||||
|
Reference in New Issue
Block a user