Added one line for private topic links to profile info.

This commit is contained in:
23rd
2025-10-31 01:04:25 +03:00
parent f11b36cdb1
commit a50141ac8a
5 changed files with 43 additions and 10 deletions

View File

@@ -1075,11 +1075,7 @@ void Filler::addTopicLink() {
const auto id = _topic->rootId();
const auto controller = _controller;
_addAction(tr::lng_context_copy_topic_link(tr::now), [=] {
const auto base = channel->hasUsername()
? channel->username()
: "c/" + QString::number(peerToChannel(channel->id).bare);
const auto query = base + '/' + QString::number(id.bare);
const auto link = channel->session().createInternalLinkFull(query);
const auto link = Info::Profile::TopicLink(_topic, true);
QGuiApplication::clipboard()->setText(link);
controller->showToast(channel->hasUsername()
? tr::lng_channel_public_link_copied(tr::now)