Allow forwarding polls to monoforums.

This commit is contained in:
John Preston
2025-06-02 18:19:16 +04:00
parent 6c80d443b9
commit dd8fdfc3d4
9 changed files with 60 additions and 33 deletions
@@ -860,7 +860,10 @@ void Widget::chosenRow(const ChosenRow &row) {
const auto history = row.key.history();
const auto topicJump = history
? history->peer->forumTopicFor(row.message.fullId.msg)
? history->peer->forumTopicFor(row.topicJumpRootId)
: nullptr;
const auto sublistJump = history
? history->peer->monoforumSublistFor(row.sublistJumpPeerId)
: nullptr;
if (topicJump) {
@@ -880,6 +883,16 @@ void Widget::chosenRow(const ChosenRow &row) {
Window::SectionShow::Way::ClearStack);
}
return;
} else if (sublistJump) {
if (row.newWindow) {
controller()->showInNewWindow(Window::SeparateId(sublistJump));
} else {
controller()->showThread(
sublistJump,
ShowAtUnreadMsgId,
Window::SectionShow::Way::ClearStack);
}
return;
} else if (const auto topic = row.key.topic()) {
auto params = Window::SectionShow(
Window::SectionShow::Way::ClearStack);