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

pinned message api used, ordering by online and displaying online count in small megagroups

This commit is contained in:
John Preston
2016-03-04 17:34:46 +02:00
parent d1353b7e73
commit 0072573925
12 changed files with 377 additions and 171 deletions

View File

@@ -4542,6 +4542,19 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
}
} break;
case mtpc_updateChannelPinnedMessage: {
const MTPDupdateChannelPinnedMessage &d(update.c_updateChannelPinnedMessage());
if (ChannelData *channel = App::channelLoaded(d.vchannel_id.v)) {
if (channel->isMegagroup()) {
channel->mgInfo->pinnedMsgId = d.vid.v;
if (App::api()) {
emit App::api()->fullPeerUpdated(channel);
}
}
}
} break;
case mtpc_updateReadChannelInbox: {
const MTPDupdateReadChannelInbox &d(update.c_updateReadChannelInbox());
ChannelData *channel = App::channelLoaded(d.vchannel_id.v);