2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Remove some more Auth() calls.

This commit is contained in:
John Preston
2019-08-06 17:40:08 +01:00
parent f48732f813
commit 4bad642190
36 changed files with 280 additions and 196 deletions

View File

@@ -217,6 +217,8 @@ void AddRow(
void SetupRows(
not_null<Ui::VerticalLayout*> container,
not_null<UserData*> self) {
const auto session = &self->session();
AddSkip(container);
AddRow(
@@ -232,7 +234,7 @@ void SetupRows(
tr::lng_settings_phone_label(),
Info::Profile::PhoneValue(self),
tr::lng_profile_copy_phone(tr::now),
[=] { Ui::show(Box<ChangePhoneBox>(&self->session())); },
[=] { Ui::show(Box<ChangePhoneBox>(session)); },
st::settingsInfoPhone);
auto username = Info::Profile::UsernameValue(self);
@@ -267,7 +269,7 @@ void SetupRows(
std::move(label),
std::move(value),
tr::lng_context_copy_mention(tr::now),
[=] { Ui::show(Box<UsernameBox>()); },
[=] { Ui::show(Box<UsernameBox>(session)); },
st::settingsInfoUsername);
AddSkip(container, st::settingsInfoAfterSkip);