MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / setUserpicPhoto

Method setUserpicPhoto

Telegram/SourceFiles/data/data_peer.cpp:421–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void PeerData::setUserpicPhoto(const MTPPhoto &data) {
422 const auto photoId = data.match([&](const MTPDphoto &data) {
423 const auto photo = owner().processPhoto(data);
424 photo->peer = this;
425 return photo->id;
426 }, [](const MTPDphotoEmpty &data) {
427 return PhotoId(0);
428 });
429 if (_userpicPhotoId != photoId) {
430 _userpicPhotoId = photoId;
431 session().changes().peerUpdated(this, UpdateFlag::Photo);
432 }
433}
434
435QImage *PeerData::userpicCloudImage(Ui::PeerUserpicView &view) const {
436 if (!_userpic.isCurrentView(view.cloud)) {

Callers 2

ApplyChannelUpdateFunction · 0.80
ApplyChatUpdateFunction · 0.80

Calls 3

peerUpdatedMethod · 0.80
processPhotoMethod · 0.45
changesMethod · 0.45

Tested by

no test coverage detected