mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Move 'Add to contacts' button up in Info.
This commit is contained in:
@@ -259,7 +259,7 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||
|
||||
addInfoOneLine(
|
||||
tr::lng_info_mobile_label(),
|
||||
PhoneValue(user),
|
||||
PhoneOrHiddenValue(user),
|
||||
tr::lng_profile_copy_phone(tr::now));
|
||||
if (user->botInfo) {
|
||||
addInfoLine(tr::lng_info_about_label(), AboutValue(user));
|
||||
@@ -270,6 +270,14 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||
tr::lng_info_username_label(),
|
||||
UsernameValue(user),
|
||||
tr::lng_context_copy_mention(tr::now));
|
||||
|
||||
const auto window = &_controller->parentController()->window()->controller();
|
||||
AddMainButton(
|
||||
result,
|
||||
tr::lng_info_add_as_contact(),
|
||||
CanAddContactValue(user),
|
||||
[=] { window->show(Box(EditContactBox, window, user)); },
|
||||
tracker);
|
||||
} else {
|
||||
auto linkText = LinkValue(
|
||||
_peer
|
||||
@@ -419,14 +427,6 @@ Ui::MultiSlideTracker DetailsFiller::fillUserButtons(
|
||||
);
|
||||
} else {
|
||||
addSendMessageButton();
|
||||
|
||||
const auto window = &_controller->parentController()->window()->controller();
|
||||
AddMainButton(
|
||||
_wrap,
|
||||
tr::lng_info_add_as_contact(),
|
||||
CanAddContactValue(user),
|
||||
[=] { window->show(Box(EditContactBox, window, user)); },
|
||||
tracker);
|
||||
}
|
||||
return tracker;
|
||||
}
|
||||
|
Reference in New Issue
Block a user