2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

group > megagroup convert added

This commit is contained in:
John Preston
2015-11-06 12:48:49 -05:00
parent 1d499129ba
commit ff1b046c17
16 changed files with 310 additions and 78 deletions

View File

@@ -550,6 +550,9 @@ namespace App {
cdata->flags = d.vflags.v;
cdata->isForbidden = false;
if (cdata->isMegagroup()) {
if (!cdata->mgInfo) {
cdata->mgInfo = new MegagroupInfo();
}
if (History *h = App::historyLoaded(cdata->id)) {
if (h->asChannelHistory()->onlyImportant()) {
MsgId fixInScrollMsgId = 0;
@@ -557,6 +560,9 @@ namespace App {
h->asChannelHistory()->getSwitchReadyFor(SwitchAtTopMsgId, fixInScrollMsgId, fixInScrollMsgTop);
}
}
} else if (cdata->mgInfo) {
delete cdata->mgInfo;
cdata->mgInfo = 0;
}
if (cdata->version < d.vversion.v) {
cdata->version = d.vversion.v;