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:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user