Version 2.8.9: Fix GIF caption edit.

This commit is contained in:
John Preston 2021-07-16 10:10:34 +03:00
parent aee991f598
commit 42eb74d07a
2 changed files with 19 additions and 1 deletions

View File

@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "media/streaming/media_streaming_instance.h"
#include "media/streaming/media_streaming_loader_local.h"
#include "media/streaming/media_streaming_player.h"
#include "styles/style_boxes.h"
namespace Ui {
namespace {
@ -87,7 +88,23 @@ ItemSingleMediaPreview::ItemSingleMediaPreview(
session->downloaderTaskFinished()
) | rpl::start_with_next([=] {
const auto computed = computeThumbInfo();
if (computed.loaded) {
if (!computed.image) {
if (_documentMedia && !_documentMedia->owner()->hasThumbnail()) {
const auto size = _documentMedia->owner()->dimensions.scaled(
st::sendMediaPreviewSize,
st::confirmMaxHeight,
Qt::KeepAspectRatio);
if (!size.isEmpty()) {
auto empty = QImage(
size,
QImage::Format_ARGB32_Premultiplied);
empty.fill(Qt::black);
preparePreview(empty);
}
_lifetimeDownload.destroy();
}
return;
} else if (computed.loaded) {
_lifetimeDownload.destroy();
}
preparePreview(computed.image->original());

View File

@ -1,5 +1,6 @@
2.8.9 (16.07.21)
- Fix GIF caption edit.
- Fix version on Windows without SetDefaultDllDirectories.
- Fix fonts on Linux.