| 1962 | } |
| 1963 | |
| 1964 | void DocumentData::collectLocalData(not_null<DocumentData*> local) { |
| 1965 | if (local == this) { |
| 1966 | return; |
| 1967 | } |
| 1968 | |
| 1969 | _owner->cache().copyIfEmpty(local->cacheKey(), cacheKey()); |
| 1970 | if (const auto localMedia = local->activeMediaView()) { |
| 1971 | auto media = createMediaView(); |
| 1972 | media->collectLocalData(localMedia.get()); |
| 1973 | _owner->keepAlive(std::move(media)); |
| 1974 | } |
| 1975 | if (!local->_location.inMediaCache() && !local->_location.isEmpty()) { |
| 1976 | _location = local->_location; |
| 1977 | session().local().writeFileLocation(mediaKey(), _location); |
| 1978 | } |
| 1979 | } |
| 1980 | |
| 1981 | PhotoData *LookupVideoCover( |
| 1982 | not_null<DocumentData*> document, |
nothing calls this directly
no test coverage detected