| 67 | } |
| 68 | |
| 69 | void CloudImage::update( |
| 70 | not_null<Main::Session*> session, |
| 71 | const ImageWithLocation &data) { |
| 72 | UpdateCloudFile( |
| 73 | _file, |
| 74 | data, |
| 75 | session->data().cache(), |
| 76 | kImageCacheTag, |
| 77 | [=](FileOrigin origin) { load(session, origin); }, |
| 78 | [=](QImage preloaded, QByteArray) { |
| 79 | setToActive(session, std::move(preloaded)); |
| 80 | }); |
| 81 | } |
| 82 | |
| 83 | bool CloudImage::empty() const { |
| 84 | return !_file.location.valid(); |
no test coverage detected