2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

upload radial progress and upload cancel done, photo / file / audio autodownload settings respected

This commit is contained in:
John Preston
2015-12-24 22:26:28 +03:00
parent 7c7d517b34
commit 4ed2d75c74
32 changed files with 2011 additions and 1558 deletions

View File

@@ -273,18 +273,7 @@ QSize StickerPreviewWidget::currentDimensions() const {
QPixmap StickerPreviewWidget::currentImage() const {
if (_doc && _cacheStatus != CacheLoaded) {
bool already = !_doc->already().isEmpty(), hasdata = !_doc->data.isEmpty();
if (!already && !hasdata && !_doc->loader && _doc->status == FileReady) {
_doc->openOnSave = 0;
_doc->save(QString());
}
if (_doc->sticker()->img->isNull() && (already || hasdata)) {
if (already) {
_doc->sticker()->img = ImagePtr(_doc->already());
} else {
_doc->sticker()->img = ImagePtr(_doc->data);
}
}
_doc->checkSticker();
if (_doc->sticker()->img->isNull()) {
if (_cacheStatus != CacheThumbLoaded) {
QSize s = currentDimensions();