2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +00:00

gif autoplay improved

This commit is contained in:
John Preston
2015-12-23 22:23:14 +03:00
parent 6170144fe9
commit b94533fcb2
18 changed files with 401 additions and 226 deletions

View File

@@ -945,6 +945,9 @@ struct AudioData {
bool loaded(bool check = false) {
return !data.isEmpty() || !already(check).isEmpty();
}
bool loadingStarted() {
return loader && loader->started();
}
float64 progress() const {
return loader ? loader->currentProgress() : ((status == FileDownloadFailed || (_location.name().isEmpty() && data.isEmpty())) ? 0 : 1);
@@ -1141,6 +1144,9 @@ struct DocumentData {
bool loaded(bool check = false) {
return !data.isEmpty() || !already(check).isEmpty();
}
bool loadingStarted() {
return loader && loader->started();
}
void prepareAutoLoader();
StickerData *sticker() {
return (type == StickerDocument) ? static_cast<StickerData*>(_additional) : 0;