mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Create ImagePtr-s using a factory method.
This commit is contained in:
@@ -287,7 +287,7 @@ void PeerData::updateUserpic(
|
||||
const MTPFileLocation &location) {
|
||||
const auto size = kUserpicSize;
|
||||
const auto loc = StorageImageLocation::FromMTP(size, size, location);
|
||||
const auto photo = loc.isNull() ? ImagePtr() : ImagePtr(loc);
|
||||
const auto photo = loc.isNull() ? ImagePtr() : Images::Create(loc);
|
||||
setUserpicChecked(photoId, loc, photo);
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ void PeerData::clearUserpic() {
|
||||
Qt::SmoothTransformation);
|
||||
return _userpic
|
||||
? _userpic
|
||||
: ImagePtr(std::move(image), "PNG");
|
||||
: Images::Create(std::move(image), "PNG");
|
||||
}
|
||||
return ImagePtr();
|
||||
}();
|
||||
|
Reference in New Issue
Block a user