2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Remove Image::toDelayedStorageImage downcaster.

This commit is contained in:
John Preston
2018-10-11 19:07:08 +03:00
parent 113f665295
commit 5a50248055
5 changed files with 23 additions and 30 deletions

View File

@@ -57,10 +57,10 @@ void UpdateImage(ImagePtr &old, ImagePtr now) {
}
if (old->isNull()) {
old = now;
} else if (const auto delayed = old->toDelayedStorageImage()) {
} else if (old->isDelayedStorageImage()) {
const auto location = now->location();
if (!location.isNull()) {
delayed->setStorageLocation(Data::FileOrigin(), location);
old->setDelayedStorageLocation(Data::FileOrigin(), location);
}
}
}