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

audio documents playback added, audio documents suppress on voice message, and both suppress on notify added

This commit is contained in:
John Preston
2015-07-01 00:07:05 +03:00
parent 387694f477
commit f7d55005c4
19 changed files with 1422 additions and 477 deletions

View File

@@ -46,7 +46,7 @@ void StickerSetInner::gotSet(const MTPmessages_StickerSet &set) {
_pack.reserve(v.size());
for (int32 i = 0, l = v.size(); i < l; ++i) {
DocumentData *doc = App::feedDocument(v.at(i));
if (!doc || !doc->sticker) continue;
if (!doc || !doc->sticker()) continue;
_pack.push_back(doc);
}
@@ -156,11 +156,11 @@ void StickerSetInner::paintEvent(QPaintEvent *e) {
if (!doc->loader && doc->status != FileFailed && !already && !hasdata) {
doc->save(QString());
}
if (doc->sticker->img->isNull() && (already || hasdata)) {
if (doc->sticker()->img->isNull() && (already || hasdata)) {
if (already) {
doc->sticker->img = ImagePtr(doc->already());
doc->sticker()->img = ImagePtr(doc->already());
} else {
doc->sticker->img = ImagePtr(doc->data);
doc->sticker()->img = ImagePtr(doc->data);
}
}
}
@@ -173,8 +173,8 @@ void StickerSetInner::paintEvent(QPaintEvent *e) {
QPoint ppos = pos + QPoint((st::stickersSize.width() - w) / 2, (st::stickersSize.height() - h) / 2);
if (goodThumb) {
p.drawPixmapLeft(ppos, width(), doc->thumb->pix(w, h));
} else if (!doc->sticker->img->isNull()) {
p.drawPixmapLeft(ppos, width(), doc->sticker->img->pix(w, h));
} else if (!doc->sticker()->img->isNull()) {
p.drawPixmapLeft(ppos, width(), doc->sticker()->img->pix(w, h));
}
}
}