mirror of https://github.com/procxx/kepka.git
Fix display / download of video messages.
This commit is contained in:
parent
518d1da736
commit
195164d9d4
|
@ -112,8 +112,6 @@ void HistoryFileMedia::setDocumentLinks(
|
||||||
}
|
}
|
||||||
if (inlinegif) {
|
if (inlinegif) {
|
||||||
save = std::make_shared<GifOpenClickHandler>(document, context);
|
save = std::make_shared<GifOpenClickHandler>(document, context);
|
||||||
} else if (document->isVoiceMessage()) {
|
|
||||||
save = std::make_shared<DocumentOpenClickHandler>(document, context);
|
|
||||||
} else {
|
} else {
|
||||||
save = std::make_shared<DocumentSaveClickHandler>(document, context);
|
save = std::make_shared<DocumentSaveClickHandler>(document, context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ HistoryGif::HistoryGif(
|
||||||
, _data(document)
|
, _data(document)
|
||||||
, _caption(st::minPhotoSize - st::msgPadding.left() - st::msgPadding.right()) {
|
, _caption(st::minPhotoSize - st::msgPadding.left() - st::msgPadding.right()) {
|
||||||
const auto item = parent->data();
|
const auto item = parent->data();
|
||||||
setDocumentLinks(_data, item, true);
|
setDocumentLinks(_data, item, !_data->isVideoMessage());
|
||||||
|
|
||||||
setStatusSize(FileStatusSizeReady);
|
setStatusSize(FileStatusSizeReady);
|
||||||
|
|
||||||
|
@ -350,9 +350,9 @@ void HistoryGif::draw(Painter &p, const QRect &r, TextSelection selection, crl::
|
||||||
}
|
}
|
||||||
const auto normal = _data->thumbnail();
|
const auto normal = _data->thumbnail();
|
||||||
if (normal && normal->loaded()) {
|
if (normal && normal->loaded()) {
|
||||||
p.drawPixmap(rthumb.topLeft(), normal->pixSingle(_realParent->fullId(), _thumbw, _thumbh, paintw, painth, roundRadius, roundCorners));
|
p.drawPixmap(rthumb.topLeft(), normal->pixSingle(_realParent->fullId(), _thumbw, _thumbh, usew, painth, roundRadius, roundCorners));
|
||||||
} else if (const auto blurred = _data->thumbnailInline()) {
|
} else if (const auto blurred = _data->thumbnailInline()) {
|
||||||
p.drawPixmap(rthumb.topLeft(), blurred->pixBlurredSingle(_realParent->fullId(), _thumbw, _thumbh, paintw, painth, roundRadius, roundCorners));
|
p.drawPixmap(rthumb.topLeft(), blurred->pixBlurredSingle(_realParent->fullId(), _thumbw, _thumbh, usew, painth, roundRadius, roundCorners));
|
||||||
} else if (!isRound) {
|
} else if (!isRound) {
|
||||||
const auto roundTop = (roundCorners & RectPart::TopLeft);
|
const auto roundTop = (roundCorners & RectPart::TopLeft);
|
||||||
const auto roundBottom = (roundCorners & RectPart::BottomLeft);
|
const auto roundBottom = (roundCorners & RectPart::BottomLeft);
|
||||||
|
|
Loading…
Reference in New Issue