2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix sticker inline bot results.

Fixes #3317.
This commit is contained in:
John Preston
2018-06-03 20:48:00 +03:00
parent e62e7d1de2
commit 2bd8737410
6 changed files with 24 additions and 15 deletions

View File

@@ -381,7 +381,7 @@ void StickerSetBox::Inner::paintEvent(QPaintEvent *e) {
p.setOpacity(1);
}
bool goodThumb = !doc->thumb->isNull() && ((doc->thumb->width() >= 128) || (doc->thumb->height() >= 128));
const auto goodThumb = doc->hasGoodStickerThumb();
if (goodThumb) {
doc->thumb->load();
} else {
@@ -389,7 +389,9 @@ void StickerSetBox::Inner::paintEvent(QPaintEvent *e) {
doc->automaticLoad(0);
}
if (doc->sticker()->img->isNull() && doc->loaded(DocumentData::FilePathResolveChecked)) {
doc->sticker()->img = doc->data().isEmpty() ? ImagePtr(doc->filepath()) : ImagePtr(doc->data());
doc->sticker()->img = doc->data().isEmpty()
? ImagePtr(doc->filepath())
: ImagePtr(doc->data());
}
}