2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Move some calls from App namespace.

This commit is contained in:
John Preston
2019-01-18 16:27:37 +04:00
parent e7804d014d
commit 4111da1dd0
74 changed files with 896 additions and 852 deletions

View File

@@ -53,10 +53,10 @@ WebPageCollage ExtractCollage(
auto &storage = Auth().data();
for (const auto &photo : photos) {
storage.photo(photo);
storage.processPhoto(photo);
}
for (const auto &document : documents) {
storage.document(document);
storage.processDocument(document);
}
auto result = WebPageCollage();
result.items.reserve(count);
@@ -89,12 +89,12 @@ WebPageCollage ExtractCollage(const MTPDwebPage &data) {
if (!data.has_cached_page()) {
return {};
}
const auto parseMedia = [&] {
const auto processMedia = [&] {
if (data.has_photo()) {
Auth().data().photo(data.vphoto);
Auth().data().processPhoto(data.vphoto);
}
if (data.has_document()) {
Auth().data().document(data.vdocument);
Auth().data().processDocument(data.vdocument);
}
};
return data.vcached_page.match([&](const auto &page) {
@@ -108,13 +108,13 @@ WebPageCollage ExtractCollage(const MTPDwebPage &data) {
case mtpc_pageBlockAudio:
return WebPageCollage();
case mtpc_pageBlockSlideshow:
parseMedia();
processMedia();
return ExtractCollage(
block.c_pageBlockSlideshow().vitems.v,
page.vphotos.v,
page.vdocuments.v);
case mtpc_pageBlockCollage:
parseMedia();
processMedia();
return ExtractCollage(
block.c_pageBlockCollage().vitems.v,
page.vphotos.v,