2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Change phone number section instead of a box.

This commit is contained in:
John Preston
2022-04-13 12:05:10 +04:00
parent 2253cd86e5
commit 488f6412f2
29 changed files with 189 additions and 136 deletions

View File

@@ -39,6 +39,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_domain.h"
#include "mtproto/mtproto_dc_options.h"
#include "window/window_session_controller.h"
#include "window/window_controller.h"
#include "window/window_peer_menu.h"
#include "apiwrap.h"
#include "api/api_peer_photo.h"
@@ -285,12 +286,16 @@ void SetupRows(
[=] { controller->show(Box<EditNameBox>(self)); },
{ &st::settingsIconUser, kIconLightBlue });
const auto showChangePhone = [=] {
controller->showSettings(ChangePhone::Id());
controller->window().activate();
};
AddRow(
container,
tr::lng_settings_phone_label(),
Info::Profile::PhoneValue(self),
tr::lng_profile_copy_phone(tr::now),
[=] { controller->show(Box<ChangePhoneBox>(controller)); },
showChangePhone,
{ &st::settingsIconCalls, kIconGreen });
auto username = Info::Profile::UsernameValue(self);
@@ -798,7 +803,7 @@ Information::Information(
setupContent(controller);
}
rpl::producer<QString> Information::Title() {
rpl::producer<QString> Information::title() {
return tr::lng_settings_section_info();
}