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

Method addTopicLink

Telegram/SourceFiles/window/window_peer_menu.cpp:1131–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1129}
1130
1131void Filler::addTopicLink() {
1132 if (!_topic || _topic->creating()) {
1133 return;
1134 }
1135 const auto channel = _topic->channel();
1136 if (!channel) {
1137 return;
1138 }
1139 const auto controller = _controller;
1140 const auto weak = base::make_weak(_topic);
1141 _addAction(tr::lng_context_copy_topic_link(tr::now), [=] {
1142 if (const auto strong = weak.get()) {
1143 const auto link = Info::Profile::TopicLink(strong, true);
1144 QGuiApplication::clipboard()->setText(link);
1145 controller->showToast(channel->hasUsername()
1146 ? tr::lng_channel_public_link_copied(tr::now)
1147 : tr::lng_context_about_private_link(tr::now));
1148 }
1149 }, &st::menuIconCopy);
1150}
1151
1152void Filler::addManageTopic() {
1153 if (!_topic || !_topic->canEdit()) {

Callers

nothing calls this directly

Calls 7

TopicLinkFunction · 0.85
hasUsernameMethod · 0.80
creatingMethod · 0.45
channelMethod · 0.45
getMethod · 0.45
setTextMethod · 0.45
showToastMethod · 0.45

Tested by

no test coverage detected