2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fix layout of some media, enable GIF autoplay.

This commit is contained in:
John Preston
2018-01-19 15:13:06 +03:00
parent d326c7e3fa
commit e6baf8ef5b
17 changed files with 66 additions and 194 deletions

View File

@@ -970,13 +970,15 @@ bool DocumentData::setRemoteVersion(int32 version) {
}
void DocumentData::setRemoteLocation(int32 dc, uint64 access) {
_dc = dc;
_access = access;
if (isValid()) {
if (_location.check()) {
Local::writeFileLocation(mediaKey(), _location);
} else {
_location = Local::readFileLocation(mediaKey());
if (_dc != dc || _access != access) {
_dc = dc;
_access = access;
if (isValid()) {
if (_location.check()) {
Local::writeFileLocation(mediaKey(), _location);
} else {
_location = Local::readFileLocation(mediaKey());
}
}
}
}