mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Highlight primary usernames in profiles like the additional ones.
This commit is contained in:
parent
ab06574fd9
commit
2de76cb75b
1 changed files with 13 additions and 4 deletions
|
@ -372,13 +372,22 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
|
||||
const auto usernameLine = addInfoOneLine(
|
||||
UsernamesSubtext(_peer, tr::lng_info_username_label()),
|
||||
UsernameValue(user, true),
|
||||
tr::lng_context_copy_mention(tr::now),
|
||||
UsernameValue(user, true) | rpl::map([=](TextWithEntities u) {
|
||||
return u.text.isEmpty()
|
||||
? TextWithEntities()
|
||||
: Ui::Text::Link(
|
||||
u,
|
||||
user->session().createInternalLinkFull(
|
||||
u.text.mid(1)));
|
||||
}),
|
||||
QString(),
|
||||
st::infoProfileLabeledUsernamePadding);
|
||||
usernameLine.subtext->overrideLinkClickHandler(UsernamesLinkCallback(
|
||||
const auto callback = UsernamesLinkCallback(
|
||||
_peer,
|
||||
Window::Show(controller),
|
||||
QString()));
|
||||
QString());
|
||||
usernameLine.text->overrideLinkClickHandler(callback);
|
||||
usernameLine.subtext->overrideLinkClickHandler(callback);
|
||||
const auto usernameLabel = usernameLine.text;
|
||||
if (user->isBot()) {
|
||||
const auto copyUsername = Ui::CreateChild<Ui::IconButton>(
|
||||
|
|
Loading…
Add table
Reference in a new issue