mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Update API scheme to layer 108.
This commit is contained in:
@@ -2719,7 +2719,8 @@ void Session::webpageApplyFields(
|
||||
const auto pendingTill = TimeId(0);
|
||||
const auto photo = data.vphoto();
|
||||
const auto document = data.vdocument();
|
||||
const auto lookupThemeDocument = [&]() -> DocumentData* {
|
||||
const auto lookupInAttribute = [&](
|
||||
const MTPDwebPageAttributeTheme &data) -> DocumentData* {
|
||||
if (const auto documents = data.vdocuments()) {
|
||||
for (const auto &document : documents->v) {
|
||||
const auto processed = processDocument(document);
|
||||
@@ -2730,6 +2731,20 @@ void Session::webpageApplyFields(
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
const auto lookupThemeDocument = [&]() -> DocumentData* {
|
||||
if (const auto attributes = data.vattributes()) {
|
||||
for (const auto &attribute : attributes->v) {
|
||||
const auto result = attribute.match([&](
|
||||
const MTPDwebPageAttributeTheme &data) {
|
||||
return lookupInAttribute(data);
|
||||
});
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
webpageApplyFields(
|
||||
page,
|
||||
ParseWebPageType(data),
|
||||
|
Reference in New Issue
Block a user