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

Method addViewDiscussion

Telegram/SourceFiles/window/window_peer_menu.cpp:919–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919void Filler::addViewDiscussion() {
920 const auto channel = _peer->asBroadcast();
921 if (!channel) {
922 return;
923 }
924 const auto chat = channel->discussionLink();
925 if (!chat) {
926 return;
927 }
928 const auto navigation = _controller;
929 _addAction(tr::lng_profile_view_discussion(tr::now), [=] {
930 if (channel->invitePeekExpires()) {
931 navigation->showToast(tr::lng_channel_invite_private(tr::now));
932 return;
933 }
934 navigation->showPeerHistory(
935 chat,
936 Window::SectionShow::Way::Forward);
937 }, &st::menuIconDiscussion);
938}
939
940void Filler::addDirectMessages() {
941 const auto channel = _peer->asBroadcast();

Callers

nothing calls this directly

Calls 5

asBroadcastMethod · 0.80
discussionLinkMethod · 0.80
invitePeekExpiresMethod · 0.80
showToastMethod · 0.45
showPeerHistoryMethod · 0.45

Tested by

no test coverage detected