2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

channel icon added, views count display done

This commit is contained in:
John Preston
2015-09-15 11:50:54 +03:00
parent eaacc1b7e2
commit 77a92c62f7
16 changed files with 487 additions and 450 deletions

View File

@@ -746,7 +746,7 @@ namespace App {
}
}
void checkEntitiesUpdate(const MTPDmessage &m) {
void checkEntitiesAndViewsUpdate(const MTPDmessage &m) {
PeerId peerId = peerFromMTP(m.vto_id);
if (m.has_from_id() && peerToUser(peerId) == MTP::authedId()) {
peerId = peerFromUser(m.vfrom_id);
@@ -761,6 +761,8 @@ namespace App {
existing->history()->addToOverview(existing, OverviewLinks);
}
}
existing->setViewsCount(m.has_views() ? m.vviews.v : -1);
}
}
@@ -774,7 +776,7 @@ namespace App {
const MTPDmessage &d(msg.c_message());
msgsIds.insert((uint64(uint32(d.vid.v)) << 32) | uint64(i), i);
if (msgsState == 1) { // new message, index my forwarded messages to links overview
checkEntitiesUpdate(d);
checkEntitiesAndViewsUpdate(d);
}
} break;
case mtpc_messageEmpty: msgsIds.insert((uint64(uint32(msg.c_messageEmpty().vid.v)) << 32) | uint64(i), i); break;