2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

fixed inline results display lag, cancelling inline query by Escape, add/erase in overview refactored, animated gifv are not in shared files anymore

This commit is contained in:
John Preston
2016-01-03 09:43:42 +08:00
parent 12ff88478c
commit 5a87bf4114
8 changed files with 152 additions and 174 deletions

View File

@@ -4128,18 +4128,12 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) {
if (peerId) {
if (HistoryItem *item = App::histItemById(peerToChannel(peerId), d.vid.v)) {
if (!text.isEmpty()) {
bool hasLinks = d.has_entities() && !d.ventities.c_vector().v.isEmpty();
if ((hasLinks && !item->hasTextLinks()) || (!hasLinks && item->textHasLinks())) {
item->setText(text, d.has_entities() ? entitiesFromMTP(d.ventities.c_vector().v) : EntitiesInText());
item->initDimensions();
Notify::historyItemResized(item);
if (item->hasTextLinks() && item->indexInOverview()) {
item->history()->addToOverview(item, OverviewLinks);
}
}
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->addToOverview(AddToOverviewNew);
}
}
}