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:
@@ -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();
|
||||
}();
|
||||
|
Reference in New Issue
Block a user