2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Refactor userpic storage and access in PeerData.

This commit is contained in:
John Preston
2017-12-05 10:41:43 +04:00
parent 62568daffe
commit 68009b6fba
16 changed files with 211 additions and 217 deletions

View File

@@ -628,8 +628,12 @@ ConfirmInviteBox::ConfirmInviteBox(QWidget*, const QString &title, bool isChanne
}
_status->setText(status);
if (photo.type() == mtpc_chatPhoto) {
auto &d = photo.c_chatPhoto();
auto location = App::imageLocation(160, 160, d.vphoto_small);
const auto &data = photo.c_chatPhoto();
const auto size = 160;
const auto location = StorageImageLocation::FromMTP(
size,
size,
data.vphoto_small);
if (!location.isNull()) {
_photo = ImagePtr(location);
if (!_photo->loaded()) {