mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
fixed entities update, version 0.8.55 stable
This commit is contained in:
@@ -3414,14 +3414,14 @@ void MainWidget::handleUpdates(const MTPUpdates &updates, uint64 randomId) {
|
||||
const MTPDupdateShortSentMessage &d(updates.c_updateShortSentMessage());
|
||||
HistoryItem *item = 0;
|
||||
if (randomId) {
|
||||
QString text = d.has_entities() ? App::histSentTextByItem(randomId) : QString();
|
||||
QString text = App::histSentTextByItem(randomId);
|
||||
feedUpdate(MTP_updateMessageID(d.vid, MTP_long(randomId))); // ignore real date
|
||||
if (!text.isEmpty()) {
|
||||
LinksInText links(linksFromMTP(d.ventities.c_vector().v));
|
||||
bool hasLinks = d.has_entities() && !d.ventities.c_vector().v.isEmpty();
|
||||
item = App::histItemById(d.vid.v);
|
||||
if (item && !links.isEmpty()) {
|
||||
if (item && ((hasLinks && !item->hasTextLinks()) || (!hasLinks && item->textHasLinks()))) {
|
||||
bool was = item->hasTextLinks();
|
||||
item->setText(text, links);
|
||||
item->setText(text, d.has_entities() ? linksFromMTP(d.ventities.c_vector().v) : LinksInText());
|
||||
item->initDimensions(0);
|
||||
itemResized(item);
|
||||
if (!was && item->hasTextLinks()) {
|
||||
@@ -3462,6 +3462,10 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
|
||||
_byPtsUpdate.insert(ptsKey(SkippedUpdate), update);
|
||||
return;
|
||||
}
|
||||
if (d.vmessage.type() == mtpc_message) { // index forwarded messages to links overview
|
||||
App::checkEntitiesUpdate(d.vmessage.c_message());
|
||||
}
|
||||
|
||||
HistoryItem *item = App::histories().addToBack(d.vmessage);
|
||||
if (item) {
|
||||
history.peerMessagesUpdated(item->history()->peer->id);
|
||||
|
Reference in New Issue
Block a user