| 419 | } |
| 420 | |
| 421 | void 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 | |
| 435 | QImage *PeerData::userpicCloudImage(Ui::PeerUserpicView &view) const { |
| 436 | if (!_userpic.isCurrentView(view.cloud)) { |
no test coverage detected