MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / addViewAsTopics

Method addViewAsTopics

Telegram/SourceFiles/window/window_peer_menu.cpp:1737–1753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1735}
1736
1737void Filler::addViewAsTopics() {
1738 if (!_peer
1739 || !_peer->isForum()
1740 || !_peer->isChannel()
1741 || (_peer->asChannel()->flags() & ChannelDataFlag::ForumTabs)
1742 || !_controller->adaptive().isOneColumn()) {
1743 return;
1744 }
1745 const auto peer = _peer;
1746 const auto controller = _controller;
1747 _addAction(tr::lng_forum_view_as_topics(tr::now), [=] {
1748 if (const auto forum = peer->forum()) {
1749 peer->owner().saveViewAsMessages(forum, false);
1750 controller->showForum(forum);
1751 }
1752 }, &st::menuIconAsTopics);
1753}
1754
1755void Filler::addSearchTopics() {
1756 const auto forum = _peer ? _peer->forum() : nullptr;

Callers

nothing calls this directly

Calls 9

isChannelMethod · 0.80
asChannelMethod · 0.80
saveViewAsMessagesMethod · 0.80
isForumMethod · 0.45
flagsMethod · 0.45
isOneColumnMethod · 0.45
forumMethod · 0.45
ownerMethod · 0.45
showForumMethod · 0.45

Tested by

no test coverage detected