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

Method setRemoteLocation

Telegram/SourceFiles/data/data_document.cpp:1918–1941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1916}
1917
1918void DocumentData::setRemoteLocation(
1919 int32 dc,
1920 uint64 access,
1921 const QByteArray &fileReference) {
1922 _fileReference = fileReference;
1923 if (_dc != dc || _access != access) {
1924 _dc = dc;
1925 _access = access;
1926 if (!isNull()) {
1927 if (_location.check()) {
1928 session().local().writeFileLocation(mediaKey(), _location);
1929 } else {
1930 _location = session().local().readFileLocation(mediaKey());
1931 if (_location.inMediaCache()) {
1932 setLoadedInMediaCacheLocation();
1933 } else if (_location.isEmpty() && loadedInMediaCache()) {
1934 session().local().writeFileLocation(
1935 mediaKey(),
1936 Core::FileLocation::InMediaCacheLocation());
1937 }
1938 }
1939 }
1940 }
1941}
1942
1943void DocumentData::setStoryMedia(bool value) {
1944 if (value) {

Callers

nothing calls this directly

Calls 6

mediaKeyFunction · 0.85
writeFileLocationMethod · 0.80
readFileLocationMethod · 0.80
inMediaCacheMethod · 0.80
checkMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected