mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
audio documents playback added, audio documents suppress on voice message, and both suppress on notify added
This commit is contained in:
@@ -800,9 +800,9 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) {
|
||||
|
||||
_caption = Text();
|
||||
QString already = _doc->already(true);
|
||||
if (_doc->sticker && !_doc->sticker->img->isNull() && _doc->sticker->img->loaded()) {
|
||||
if (_doc->sticker() && !_doc->sticker()->img->isNull() && _doc->sticker()->img->loaded()) {
|
||||
_currentGif.stop();
|
||||
_current = _doc->sticker->img->pix();
|
||||
_current = _doc->sticker()->img->pix();
|
||||
} else if (!already.isEmpty()) {
|
||||
QImageReader reader(already);
|
||||
if (reader.canRead()) {
|
||||
@@ -1010,7 +1010,7 @@ void MediaView::paintEvent(QPaintEvent *e) {
|
||||
QRect imgRect(_x, _y, _w, _h);
|
||||
const QPixmap *toDraw = _currentGif.isNull() ? &_current : &_currentGif.current(_currentGif.w, _currentGif.h, false);
|
||||
if (imgRect.intersects(r)) {
|
||||
if (toDraw->hasAlpha() && (!_doc || !_doc->sticker || _doc->sticker->img->isNull())) {
|
||||
if (toDraw->hasAlpha() && (!_doc || !_doc->sticker() || _doc->sticker()->img->isNull())) {
|
||||
p.fillRect(imgRect, _transparentBrush);
|
||||
}
|
||||
if (_zoom) {
|
||||
@@ -1415,7 +1415,7 @@ void MediaView::preloadData(int32 delta) {
|
||||
switch (media->type()) {
|
||||
case MediaTypePhoto: static_cast<HistoryPhoto*>(media)->photo()->full->load(); break;
|
||||
case MediaTypeDocument: static_cast<HistoryDocument*>(media)->document()->thumb->load(); break;
|
||||
case MediaTypeSticker: static_cast<HistorySticker*>(media)->document()->sticker->img->load(); break;
|
||||
case MediaTypeSticker: static_cast<HistorySticker*>(media)->document()->sticker()->img->load(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user