Update API scheme on layer 228.

This commit is contained in:
John Preston
2026-06-19 13:14:28 +04:00
parent 5ecffe5c5c
commit a0fd43642a
19 changed files with 162 additions and 11 deletions
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_peer.h"
#include "data/data_session.h"
#include "data/data_user.h"
#include "history/history.h"
#include "main/main_session.h"
namespace Api {
@@ -189,6 +190,12 @@ void Communities::toggleCollapsedInDialogs(
}
};
apply(collapsed);
if (!collapsed) {
const auto history = community->owner().history(community);
if (history->folderKnown() && history->isPinnedDialog(FilterId())) {
community->owner().setChatPinned(history, FilterId(), false);
}
}
using Flag = MTPcommunities_ToggleCommunityCollapsedInDialogs::Flag;
_api.request(MTPcommunities_ToggleCommunityCollapsedInDialogs(
MTP_flags(collapsed ? Flag::f_collapsed : Flag()),