2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-07 18:15:15 +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

@@ -70,6 +70,13 @@ not_null<Dialogs::MainList*> Forum::topicsList() {
return &_topicsList;
}
void Forum::unpinTopic() {
const auto list = _topicsList.pinned();
while (!list->order().empty()) {
list->setPinned(list->order().front(), false);
}
}
rpl::producer<> Forum::destroyed() const {
return channel()->flagsValue(
) | rpl::filter([=](const ChannelData::Flags::Change &update) {