2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Use final Image with different Images::Source-s.

This commit is contained in:
John Preston
2018-10-12 19:41:51 +03:00
parent 5a50248055
commit 4b5b79e415
16 changed files with 1376 additions and 993 deletions

View File

@@ -195,6 +195,9 @@ ImagePtr PeerData::currentUserpic() const {
return _userpic;
}
}
if (!_userpicEmpty) {
refreshEmptyUserpic();
}
return ImagePtr();
}
@@ -296,10 +299,9 @@ void PeerData::clearUserpic() {
auto image = Messenger::Instance().logoNoMargin().scaledToWidth(
kUserpicSize,
Qt::SmoothTransformation);
auto pixmap = App::pixmapFromImageInPlace(std::move(image));
return _userpic
? _userpic
: ImagePtr(std::move(pixmap), "PNG");
: ImagePtr(std::move(image), "PNG");
}
return ImagePtr();
}();