2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

merged supergroup with migrated group history, loading messages by 3 (temp! testing)

This commit is contained in:
John Preston
2015-11-13 18:14:33 +03:00
parent fd339e401f
commit 497602f47e
28 changed files with 1390 additions and 740 deletions

View File

@@ -411,6 +411,24 @@ void ChannelData::fullUpdated() {
_lastFullUpdate = getms(true);
}
void ChannelData::flagsUpdated() {
if (isMegagroup()) {
if (!mgInfo) {
mgInfo = new MegagroupInfo();
}
if (History *h = App::historyLoaded(id)) {
if (h->asChannelHistory()->onlyImportant()) {
MsgId fixInScrollMsgId = 0;
int32 fixInScrollMsgTop = 0;
h->asChannelHistory()->getSwitchReadyFor(SwitchAtTopMsgId, fixInScrollMsgId, fixInScrollMsgTop);
}
}
} else if (mgInfo) {
delete mgInfo;
mgInfo = 0;
}
}
ChannelData::~ChannelData() {
delete mgInfo;
}