Fixed display of recent posts with some types documents in statistics.
This commit is contained in:
parent
1e57563349
commit
6de95fc4ed
|
@ -105,7 +105,8 @@ MessagePreview::MessagePreview(
|
||||||
}
|
}
|
||||||
processPreview();
|
processPreview();
|
||||||
}
|
}
|
||||||
if (!_photoMedia && !_documentMedia) {
|
if ((!_documentMedia || _documentMedia->thumbnailSize().isNull())
|
||||||
|
&& !_photoMedia) {
|
||||||
const auto userpic = Ui::CreateChild<Ui::UserpicButton>(
|
const auto userpic = Ui::CreateChild<Ui::UserpicButton>(
|
||||||
this,
|
this,
|
||||||
item->history()->peer,
|
item->history()->peer,
|
||||||
|
@ -200,6 +201,7 @@ void MessagePreview::processPreview() {
|
||||||
session->downloaderTaskFinished()
|
session->downloaderTaskFinished()
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
const auto computed = computeThumbInfo();
|
const auto computed = computeThumbInfo();
|
||||||
|
const auto guard = gsl::finally([&] { update(); });
|
||||||
if (!computed.image) {
|
if (!computed.image) {
|
||||||
if (_documentMedia && !_documentMedia->owner()->hasThumbnail()) {
|
if (_documentMedia && !_documentMedia->owner()->hasThumbnail()) {
|
||||||
_preview = QImage();
|
_preview = QImage();
|
||||||
|
|
Loading…
Reference in New Issue