From 8f9bed0443fd045f1508fdcfd2840f9784424001 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 17 Mar 2019 22:57:09 +0400 Subject: [PATCH] Fix document caption in media viewer. Regression was introduced in 5cae57601a. Fixes #5799, fixes #5802, fixes #5804. --- .../SourceFiles/media/view/media_view_overlay_widget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index c4d86342c..e2c05c7f1 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -1661,7 +1661,7 @@ void OverlayWidget::showPhoto(not_null photo, not_null co refreshMediaViewer(); - displayPhoto(photo, 0); + displayPhoto(photo, nullptr); preloadData(0); activateControls(); } @@ -1763,9 +1763,7 @@ void OverlayWidget::displayDocument(DocumentData *doc, HistoryItem *item) { _radial.stop(); refreshMediaViewer(); - if ((item ? item->fullId() : FullMsgId()) != _msgid) { - refreshCaption(item); - } + refreshCaption(item); if (_doc) { if (_doc->sticker()) { if (const auto image = _doc->getStickerLarge()) {