Moved ID info to top
This commit is contained in:
parent
343e188448
commit
4cd61812f9
1 changed files with 29 additions and 29 deletions
|
|
@ -255,6 +255,18 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
return result;
|
||||
};
|
||||
if (const auto user = _peer->asUser()) {
|
||||
if (user->isBot()) {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_bot_id(),
|
||||
IDValue(user),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
} else {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_user_id(),
|
||||
IDValue(user),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
}
|
||||
|
||||
if (user->session().supportMode()) {
|
||||
addInfoLineGeneric(
|
||||
user->session().supportHelper().infoLabelValue(user),
|
||||
|
|
@ -275,18 +287,6 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
UsernameValue(user),
|
||||
tr::lng_context_copy_mention(tr::now));
|
||||
|
||||
if (user->isBot()) {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_bot_id(),
|
||||
IDValue(user),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
} else {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_user_id(),
|
||||
IDValue(user),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
}
|
||||
|
||||
const auto window = &_controller->parentController()->window();
|
||||
AddMainButton(
|
||||
result,
|
||||
|
|
@ -295,6 +295,23 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
[=] { window->show(Box(EditContactBox, window, user)); },
|
||||
tracker);
|
||||
} else {
|
||||
if (_peer->isChat()) {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_group_id(),
|
||||
IDValue(_peer),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
} else if (_peer->isMegagroup()) {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_supergroup_id(),
|
||||
IDValue(_peer),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
} else {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_channel_id(),
|
||||
IDValue(_peer),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
}
|
||||
|
||||
auto linkText = LinkValue(
|
||||
_peer
|
||||
) | rpl::map([](const QString &link) {
|
||||
|
|
@ -337,23 +354,6 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
)->setLinksTrusted();
|
||||
}
|
||||
|
||||
if (_peer->isChat()) {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_group_id(),
|
||||
IDValue(_peer),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
} else if (_peer->isMegagroup()) {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_supergroup_id(),
|
||||
IDValue(_peer),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
} else {
|
||||
addInfoOneLine(
|
||||
tr::ktg_profile_channel_id(),
|
||||
IDValue(_peer),
|
||||
tr::ktg_profile_copy_id(tr::now));
|
||||
}
|
||||
|
||||
addInfoLine(tr::lng_info_about_label(), AboutValue(_peer));
|
||||
|
||||
if (const auto channel = _peer->asChannel()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue