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;
|
return result;
|
||||||
};
|
};
|
||||||
if (const auto user = _peer->asUser()) {
|
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()) {
|
if (user->session().supportMode()) {
|
||||||
addInfoLineGeneric(
|
addInfoLineGeneric(
|
||||||
user->session().supportHelper().infoLabelValue(user),
|
user->session().supportHelper().infoLabelValue(user),
|
||||||
|
|
@ -275,18 +287,6 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||||
UsernameValue(user),
|
UsernameValue(user),
|
||||||
tr::lng_context_copy_mention(tr::now));
|
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();
|
const auto window = &_controller->parentController()->window();
|
||||||
AddMainButton(
|
AddMainButton(
|
||||||
result,
|
result,
|
||||||
|
|
@ -295,6 +295,23 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||||
[=] { window->show(Box(EditContactBox, window, user)); },
|
[=] { window->show(Box(EditContactBox, window, user)); },
|
||||||
tracker);
|
tracker);
|
||||||
} else {
|
} 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(
|
auto linkText = LinkValue(
|
||||||
_peer
|
_peer
|
||||||
) | rpl::map([](const QString &link) {
|
) | rpl::map([](const QString &link) {
|
||||||
|
|
@ -337,23 +354,6 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||||
)->setLinksTrusted();
|
)->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));
|
addInfoLine(tr::lng_info_about_label(), AboutValue(_peer));
|
||||||
|
|
||||||
if (const auto channel = _peer->asChannel()) {
|
if (const auto channel = _peer->asChannel()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue