| 1019 | } |
| 1020 | |
| 1021 | bool DocumentData::saveToCache() const { |
| 1022 | return (size < Storage::kMaxFileInMemory) |
| 1023 | && ((type == StickerDocument) |
| 1024 | || (_flags & Flag::ForceToCache) |
| 1025 | || isAnimation() |
| 1026 | || isVoiceMessage() |
| 1027 | || isWallPaper() |
| 1028 | || isTheme() |
| 1029 | || (hasMimeType(u"image/png"_q) |
| 1030 | && _filename.startsWith("image_"))); |
| 1031 | } |
| 1032 | |
| 1033 | void DocumentData::automaticLoadSettingsChanged() { |
| 1034 | if (!cancelled() || status != FileReady) { |
no outgoing calls
no test coverage detected