| 279 | } |
| 280 | |
| 281 | void DocumentMedia::checkStickerLarge() { |
| 282 | if (_sticker) { |
| 283 | return; |
| 284 | } |
| 285 | const auto data = _owner->sticker(); |
| 286 | if (!data) { |
| 287 | return; |
| 288 | } |
| 289 | automaticLoad(_owner->stickerSetOrigin(), nullptr); |
| 290 | if (data->isAnimated() || !loaded()) { |
| 291 | return; |
| 292 | } |
| 293 | if (_bytes.isEmpty()) { |
| 294 | const auto &loc = _owner->location(true); |
| 295 | if (loc.accessEnable()) { |
| 296 | _sticker = std::make_unique<Image>(loc.name()); |
| 297 | loc.accessDisable(); |
| 298 | } |
| 299 | } else { |
| 300 | _sticker = std::make_unique<Image>(_bytes); |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | void DocumentMedia::automaticLoad( |
| 305 | Data::FileOrigin origin, |
no test coverage detected