mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Seek done in video player in MediaView. Some memory leaks fixed.
Using pixmapFromImageInPlace() instead of QPixmap::fromImage().
This commit is contained in:
@@ -220,7 +220,7 @@ void UserData::setPhoto(const MTPUserProfilePhoto &p) { // see Local::readPeer a
|
||||
newPhotoId = 0;
|
||||
if (id == ServiceUserId) {
|
||||
if (_userpic.v() == userDefPhoto(colorIndex).v()) {
|
||||
newPhoto = ImagePtr(QPixmap::fromImage(App::wnd()->iconLarge().scaledToWidth(160, Qt::SmoothTransformation), Qt::ColorOnly), "PNG");
|
||||
newPhoto = ImagePtr(App::pixmapFromImageInPlace(App::wnd()->iconLarge().scaledToWidth(160, Qt::SmoothTransformation)), "PNG");
|
||||
}
|
||||
} else {
|
||||
newPhoto = userDefPhoto(colorIndex);
|
||||
@@ -299,12 +299,11 @@ void UserData::setBotInfoVersion(int version) {
|
||||
botInfo->commands.clear();
|
||||
Notify::botCommandsChanged(this);
|
||||
}
|
||||
delete botInfo;
|
||||
botInfo = 0;
|
||||
botInfo = nullptr;
|
||||
Notify::userIsBotChanged(this);
|
||||
}
|
||||
} else if (!botInfo) {
|
||||
botInfo = new BotInfo();
|
||||
botInfo = std_::make_unique<BotInfo>();
|
||||
botInfo->version = version;
|
||||
Notify::userIsBotChanged(this);
|
||||
} else if (botInfo->version < version) {
|
||||
|
Reference in New Issue
Block a user