Use userpic if no photo thumbnail is loaded.

This commit is contained in:
John Preston 2019-11-04 14:54:25 +03:00
parent d63e50944a
commit bd0aee2f77

View file

@ -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());
}