2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Update API scheme to layer 115.

This commit is contained in:
John Preston
2020-07-01 18:19:25 +04:00
parent 9370e87c54
commit 638d4d63c5
17 changed files with 414 additions and 224 deletions

View File

@@ -1008,14 +1008,16 @@ void Session::setupChannelLeavingViewer() {
PeerUpdate::Flag::ChannelAmIn
) | rpl::map([](const PeerUpdate &update) {
return update.peer->asChannel();
}) | rpl::filter([](not_null<ChannelData*> channel) {
return !(channel->amIn());
}) | rpl::start_with_next([=](not_null<ChannelData*> channel) {
// channel->clearFeed(); // #feed
if (const auto history = historyLoaded(channel->id)) {
history->removeJoinedMessage();
history->updateChatListExistence();
history->updateChatListSortPosition();
if (channel->amIn()) {
channel->clearInvitePeek();
} else {
// channel->clearFeed(); // #feed
if (const auto history = historyLoaded(channel->id)) {
history->removeJoinedMessage();
history->updateChatListExistence();
history->updateChatListSortPosition();
}
}
}, _lifetime);
}