mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +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)); },
|
[=] { controller->show(Box<EditNameBox>(self)); },
|
||||||
{ &st::menuIconProfile });
|
{ &st::menuIconProfile });
|
||||||
|
|
||||||
const auto showChangePhone = [=] {
|
const auto copyPhone = [=] {
|
||||||
controller->show(
|
QGuiApplication::clipboard()->setText(self->phone());
|
||||||
Ui::MakeInformBox(tr::lng_change_phone_error()));
|
controller->showToast(tr::lng_text_copied(tr::now), 500);
|
||||||
controller->window().activate();
|
|
||||||
};
|
};
|
||||||
AddRow(
|
AddRow(
|
||||||
container,
|
container,
|
||||||
tr::lng_settings_phone_label(),
|
tr::lng_settings_phone_label(),
|
||||||
Info::Profile::PhoneValue(self),
|
Info::Profile::PhoneValue(self),
|
||||||
tr::lng_profile_copy_phone(tr::now),
|
tr::lng_profile_copy_phone(tr::now),
|
||||||
showChangePhone,
|
copyPhone,
|
||||||
{ &st::menuIconPhone });
|
{ &st::menuIconPhone });
|
||||||
|
|
||||||
auto username = Info::Profile::UsernameValue(self);
|
auto username = Info::Profile::UsernameValue(self);
|
||||||
|
|
Loading…
Add table
Reference in a new issue