2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 23:55:12 +00:00

Implement forwarding to topics.

This commit is contained in:
John Preston
2022-11-01 08:46:31 +04:00
parent c497e9ca9c
commit 1ac051a812
38 changed files with 1413 additions and 561 deletions

View File

@@ -622,15 +622,29 @@ void SessionNavigation::showPeerInfo(
void SessionNavigation::showTopic(
not_null<Data::ForumTopic*> topic,
MsgId commentId,
MsgId itemId,
const SectionShow &params) {
return showRepliesForMessage(
topic->history(),
topic->rootId(),
commentId,
itemId,
params);
}
void SessionNavigation::showThread(
not_null<Data::Thread*> thread,
MsgId itemId,
const SectionShow &params) {
if (const auto topic = thread->asTopic()) {
showTopic(topic, itemId, params);
} else {
showPeerHistory(thread->asHistory(), params, itemId);
}
if (parentController()->activeChatCurrent().thread() == thread) {
parentController()->content()->clearSelectingPeer();
}
}
void SessionNavigation::showPeerInfo(
not_null<PeerData*> peer,
const SectionShow &params) {