2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Support pinned topics in forums.

This commit is contained in:
John Preston
2022-10-19 12:19:11 +04:00
parent 306179ca7c
commit adaa1d0c55
7 changed files with 86 additions and 41 deletions

View File

@@ -1823,10 +1823,13 @@ void Session::setChatPinned(
bool pinned) {
Expects(key.entry()->folderKnown());
const auto list = filterId
const auto list = (filterId
? chatsFilters().chatsList(filterId)
: chatsList(key.entry()->folder());
list->pinned()->setPinned(key, pinned);
: chatsListFor(key.entry()))->pinned();
if (const auto topic = key.topic()) {
topic->forum()->unpinTopic();
}
list->setPinned(key, pinned);
notifyPinnedDialogsOrderUpdated();
}