From bd0aee2f772177e90e327cd9d46271d194799939 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 4 Nov 2019 14:54:25 +0300 Subject: [PATCH] Use userpic if no photo thumbnail is loaded. --- .../SourceFiles/media/view/media_view_overlay_widget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 210cc88da..aca34d996 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -2528,6 +2528,15 @@ void OverlayWidget::validatePhotoCurrentImage() { validatePhotoImage(_photo->thumbnail(), true); validatePhotoImage(_photo->thumbnailSmall(), true); validatePhotoImage(_photo->thumbnailInline(), true); + if (_current.isNull() + && _peer + && !_msgid + && _peer->userpicLoaded() + && _peer->userpicLocation().file().valid()) { + validatePhotoImage( + Images::Create(_peer->userpicLocation()).get(), + true); + } if (_current.isNull()) { _photo->loadThumbnailSmall(fileOrigin()); }