MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / finishLoad

Method finishLoad

Telegram/SourceFiles/data/data_document.cpp:1041–1056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039}
1040
1041void DocumentData::finishLoad() {
1042 // NB! _loader may be in ~FileLoader() already.
1043 const auto guard = gsl::finally([&] {
1044 destroyLoader();
1045 });
1046 if (!_loader || _loader->cancelled()) {
1047 _flags |= Flag::DownloadCancelled;
1048 return;
1049 }
1050 setLocation(Core::FileLocation(_loader->fileName()));
1051 setGoodThumbnailDataReady();
1052 if (const auto media = activeMediaView()) {
1053 media->setBytes(_loader->bytes());
1054 media->checkStickerLarge(_loader.get());
1055 }
1056}
1057
1058void DocumentData::destroyLoader() {
1059 if (!_loader) {

Callers

nothing calls this directly

Calls 7

fileNameMethod · 0.80
setBytesMethod · 0.80
bytesMethod · 0.80
checkStickerLargeMethod · 0.80
FileLocationClass · 0.50
cancelledMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected