mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
feat: copy phone on click
This commit is contained in:
parent
58e38c487a
commit
e47ff9fd34
1 changed files with 4 additions and 5 deletions
|
@ -369,17 +369,16 @@ void SetupRows(
|
|||
[=] { controller->show(Box<EditNameBox>(self)); },
|
||||
{ &st::menuIconProfile });
|
||||
|
||||
const auto showChangePhone = [=] {
|
||||
controller->show(
|
||||
Ui::MakeInformBox(tr::lng_change_phone_error()));
|
||||
controller->window().activate();
|
||||
const auto copyPhone = [=] {
|
||||
QGuiApplication::clipboard()->setText(self->phone());
|
||||
controller->showToast(tr::lng_text_copied(tr::now), 500);
|
||||
};
|
||||
AddRow(
|
||||
container,
|
||||
tr::lng_settings_phone_label(),
|
||||
Info::Profile::PhoneValue(self),
|
||||
tr::lng_profile_copy_phone(tr::now),
|
||||
showChangePhone,
|
||||
copyPhone,
|
||||
{ &st::menuIconPhone });
|
||||
|
||||
auto username = Info::Profile::UsernameValue(self);
|
||||
|
|
Loading…
Add table
Reference in a new issue