mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Don't hold session pointer in Data::CloudImage.
This commit is contained in:
@@ -73,12 +73,14 @@ void UserData::setIsContact(bool is) {
|
||||
|
||||
// see Local::readPeer as well
|
||||
void UserData::setPhoto(const MTPUserProfilePhoto &photo) {
|
||||
if (photo.type() == mtpc_userProfilePhoto) {
|
||||
const auto &data = photo.c_userProfilePhoto();
|
||||
updateUserpic(data.vphoto_id().v, data.vdc_id().v, data.vphoto_small());
|
||||
} else {
|
||||
photo.match([&](const MTPDuserProfilePhoto &data) {
|
||||
updateUserpic(
|
||||
data.vphoto_id().v,
|
||||
data.vdc_id().v,
|
||||
data.vphoto_small());
|
||||
}, [&](const MTPDuserProfilePhotoEmpty &) {
|
||||
clearUserpic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
auto UserData::unavailableReasons() const
|
||||
|
Reference in New Issue
Block a user