2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Get rid of redudant cmake options

This commit is contained in:
Ilya Fedin
2020-08-31 12:26:16 +04:00
committed by John Preston
parent f128665f6b
commit 70c993774a
9 changed files with 6 additions and 44 deletions

View File

@@ -43,20 +43,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Settings {
bool HasConnectionType() {
#ifndef TDESKTOP_DISABLE_NETWORK_PROXY
return true;
#endif // TDESKTOP_DISABLE_NETWORK_PROXY
return false;
}
void SetupConnectionType(
not_null<Main::Account*> account,
not_null<Ui::VerticalLayout*> container) {
if (!HasConnectionType()) {
return;
}
#ifndef TDESKTOP_DISABLE_NETWORK_PROXY
const auto connectionType = [=] {
const auto transport = account->mtp().dctransport();
if (Global::ProxySettings() != MTP::ProxyData::Settings::Enabled) {
@@ -81,7 +70,6 @@ void SetupConnectionType(
button->addClickHandler([=] {
Ui::show(ProxiesBoxController::CreateOwningBox(account));
});
#endif // TDESKTOP_DISABLE_NETWORK_PROXY
}
bool HasUpdate() {
@@ -571,13 +559,11 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
if (!cAutoUpdate()) {
addUpdate();
}
if (HasConnectionType()) {
addDivider();
AddSkip(content);
AddSubsectionTitle(content, tr::lng_settings_network_proxy());
SetupConnectionType(&controller->session().account(), content);
AddSkip(content);
}
addDivider();
AddSkip(content);
AddSubsectionTitle(content, tr::lng_settings_network_proxy());
SetupConnectionType(&controller->session().account(), content);
AddSkip(content);
SetupDataStorage(controller, content);
SetupAutoDownload(controller, content);
SetupSystemIntegration(content, [=](Type type) {