2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

not loaded thumbs are now white, always initDimensions() when media is updated

This commit is contained in:
John Preston
2016-01-09 15:11:23 +08:00
parent a39810a9c5
commit f66c54ee6b
6 changed files with 110 additions and 95 deletions

View File

@@ -4128,12 +4128,11 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) {
feedUpdate(MTP_updateMessageID(d.vid, MTP_long(randomId))); // ignore real date
if (peerId) {
if (HistoryItem *item = App::histItemById(peerToChannel(peerId), d.vid.v)) {
if (!text.isEmpty()) {
item->setText(text, d.has_entities() ? entitiesFromMTP(d.ventities.c_vector().v) : EntitiesInText());
item->initDimensions();
Notify::historyItemResized(item);
}
item->updateMedia(d.has_media() ? (&d.vmedia) : 0, true);
item->setText(text, d.has_entities() ? entitiesFromMTP(d.ventities.c_vector().v) : EntitiesInText());
item->updateMedia(d.has_media() ? (&d.vmedia) : 0);
item->initDimensions();
Notify::historyItemResized(item);
item->addToOverview(AddToOverviewNew);
}
}