2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +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

@@ -1331,18 +1331,7 @@ void StickerPanInner::paintEvent(QPaintEvent *e) {
if (goodThumb) {
sticker->thumb->load();
} else {
bool already = !sticker->already().isEmpty(), hasdata = !sticker->data.isEmpty();
if (!already && !hasdata && !sticker->loader && sticker->status == FileReady) {
sticker->openOnSave = 0;
sticker->save(QString());
}
if (sticker->sticker()->img->isNull() && (already || hasdata)) {
if (already) {
sticker->sticker()->img = ImagePtr(sticker->already());
} else {
sticker->sticker()->img = ImagePtr(sticker->data);
}
}
sticker->checkSticker();
}
float64 coef = qMin((st::stickerPanSize.width() - st::msgRadius * 2) / float64(sticker->dimensions.width()), (st::stickerPanSize.height() - st::msgRadius * 2) / float64(sticker->dimensions.height()));
@@ -1521,18 +1510,7 @@ void StickerPanInner::preloadImages() {
if (goodThumb) {
sticker->thumb->load();
} else {
bool already = !sticker->already().isEmpty(), hasdata = !sticker->data.isEmpty();
if (!already && !hasdata && !sticker->loader && sticker->status == FileReady) {
sticker->openOnSave = 0;
sticker->save(QString());
}
//if (sticker->sticker->img->isNull() && (already || hasdata)) {
// if (already) {
// sticker->sticker->img = ImagePtr(sticker->already());
// } else {
// sticker->sticker->img = ImagePtr(sticker->data);
// }
//}
sticker->automaticLoad(0);
}
}
if (k > StickerPanPerRow * (StickerPanPerRow + 1)) break;