From 22df6fb42e14e41caf213de8e4fbbb24e5cbf926 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 31 Dec 2019 14:56:31 +0300 Subject: [PATCH] Allow videos to have size as before streaming. Fixes #6915. --- .../SourceFiles/history/view/media/history_view_gif.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index e59822ac7..8e7dfd53d 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -111,7 +111,9 @@ QSize Gif::countOptimalSize() { _parent->skipBlockHeight()); } - const auto maxSize = _data->isVideoMessage() + const auto maxSize = _data->isVideoFile() + ? st::maxMediaSize + : _data->isVideoMessage() ? st::maxVideoMessageSize : st::maxGifSize; const auto size = style::ConvertScale(videoSize()); @@ -160,7 +162,9 @@ QSize Gif::countOptimalSize() { QSize Gif::countCurrentSize(int newWidth) { auto availableWidth = newWidth; - const auto maxSize = _data->isVideoMessage() + const auto maxSize = _data->isVideoFile() + ? st::maxMediaSize + : _data->isVideoMessage() ? st::maxVideoMessageSize : st::maxGifSize; const auto size = style::ConvertScale(videoSize());