| 917 | } |
| 918 | |
| 919 | void 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 | |
| 940 | void Filler::addDirectMessages() { |
| 941 | const auto channel = _peer->asBroadcast(); |
nothing calls this directly
no test coverage detected