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

Remove some activeAccount() calls.

This commit is contained in:
John Preston
2020-06-10 18:52:44 +04:00
parent 598fb67cdf
commit ea86433be5
28 changed files with 132 additions and 58 deletions

View File

@@ -48,7 +48,9 @@ bool HasConnectionType() {
return false;
}
void SetupConnectionType(not_null<Ui::VerticalLayout*> container) {
void SetupConnectionType(
not_null<Main::Account*> account,
not_null<Ui::VerticalLayout*> container) {
if (!HasConnectionType()) {
return;
}
@@ -74,8 +76,8 @@ void SetupConnectionType(not_null<Ui::VerticalLayout*> container) {
Global::RefConnectionTypeChanged()
)) | rpl::map(connectionType),
st::settingsButton);
button->addClickHandler([] {
Ui::show(ProxiesBoxController::CreateOwningBox());
button->addClickHandler([=] {
Ui::show(ProxiesBoxController::CreateOwningBox(account));
});
#endif // TDESKTOP_DISABLE_NETWORK_PROXY
}
@@ -563,7 +565,7 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
addDivider();
AddSkip(content);
AddSubsectionTitle(content, tr::lng_settings_network_proxy());
SetupConnectionType(content);
SetupConnectionType(&controller->session().account(), content);
AddSkip(content);
}
SetupDataStorage(controller, content);