see Serialize::readPeer as well
| 172 | |
| 173 | // see Serialize::readPeer as well |
| 174 | void UserData::setPhoto(const MTPUserProfilePhoto &photo) { |
| 175 | photo.match([&](const MTPDuserProfilePhoto &data) { |
| 176 | if (data.is_personal()) { |
| 177 | addFlags(UserDataFlag::PersonalPhoto); |
| 178 | } else { |
| 179 | removeFlags(UserDataFlag::PersonalPhoto); |
| 180 | } |
| 181 | updateUserpic( |
| 182 | data.vphoto_id().v, |
| 183 | data.vdc_id().v, |
| 184 | data.is_has_video()); |
| 185 | }, [&](const MTPDuserProfilePhotoEmpty &) { |
| 186 | removeFlags(UserDataFlag::PersonalPhoto); |
| 187 | clearUserpic(); |
| 188 | }); |
| 189 | } |
| 190 | |
| 191 | auto UserData::unavailableReasons() const |
| 192 | -> const std::vector<Data::UnavailableReason> & { |
no outgoing calls
no test coverage detected