2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move calls settings to Settings > Advanced.

Also add calls settings button to the calls list box.
This commit is contained in:
John Preston
2019-01-11 13:04:28 +04:00
parent c4d919d46b
commit 8711830f66
8 changed files with 77 additions and 15 deletions

View File

@@ -436,11 +436,32 @@ void SetupPerformance(not_null<Ui::VerticalLayout*> container) {
}, container->lifetime());
}
void SetupSystemIntegration(
not_null<Ui::VerticalLayout*> container,
Fn<void(Type)> showOther) {
AddDivider(container);
AddSkip(container);
AddSubsectionTitle(container, lng_settings_system_integration);
AddButton(
container,
lng_settings_section_call_settings,
st::settingsButton
)->addClickHandler([=] {
showOther(Type::Calls);
});
SetupTray(container);
AddSkip(container);
}
Advanced::Advanced(QWidget *parent, UserData *self)
: Section(parent) {
setupContent();
}
rpl::producer<Type> Advanced::sectionShowOther() {
return _showOther.events();
}
void Advanced::setupContent() {
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this);
@@ -473,18 +494,16 @@ void Advanced::setupContent() {
}
SetupDataStorage(content);
SetupAutoDownload(content);
if (HasTray()) {
addDivider();
AddSkip(content);
AddSubsectionTitle(content, lng_settings_system_integration);
SetupTray(content);
AddSkip(content);
}
addDivider();
SetupSystemIntegration(content, [=](Type type) {
_showOther.fire_copy(type);
});
AddDivider(content);
AddSkip(content);
AddSubsectionTitle(content, lng_settings_performance);
SetupPerformance(content);
AddSkip(content);
if (cAutoUpdate()) {
addUpdate();
}