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

Implement privacy and security settings section.

This commit is contained in:
John Preston
2018-09-09 15:10:54 +03:00
parent b8c2c3991f
commit 633ff4b60e
12 changed files with 582 additions and 34 deletions

View File

@@ -535,7 +535,7 @@ void SetupMediaOptions(not_null<Ui::VerticalLayout*> container) {
AddButton(
container,
lng_media_auto_settings,
st::settingsChatButton
st::settingsButton
)->addClickHandler([] {
Ui::show(Box<AutoDownloadBox>());
});
@@ -543,7 +543,7 @@ void SetupMediaOptions(not_null<Ui::VerticalLayout*> container) {
AddButton(
container,
lng_stickers_you_have,
st::settingsChatButton
st::settingsButton
)->addClickHandler([] {
Ui::show(Box<StickersBox>(StickersBox::Section::Installed));
});
@@ -555,12 +555,7 @@ void SetupChatBackground(not_null<Ui::VerticalLayout*> container) {
AddDivider(container);
AddSkip(container);
container->add(
object_ptr<Ui::FlatLabel>(
container,
Lang::Viewer(lng_settings_section_background),
st::settingsBackgroundTitle),
st::settingsBackgroundTitlePadding);
AddSubsectionTitle(container, lng_settings_section_background);
container->add(
object_ptr<BackgroundRow>(container),
@@ -637,7 +632,7 @@ void SetupThemeOptions(not_null<Ui::VerticalLayout*> container) {
AddButton(
container,
lng_settings_use_night_mode,
st::settingsChatButton
st::settingsButton
)->toggleOn(
rpl::single(Window::Theme::IsNightMode())
)->toggledValue(
@@ -657,9 +652,9 @@ void SetupThemeOptions(not_null<Ui::VerticalLayout*> container) {
AddButton(
container,
lng_settings_bg_edit_theme,
st::settingsChatButton
st::settingsButton
)->addClickHandler(App::LambdaDelayed(
st::settingsChatButton.ripple.hideDuration,
st::settingsButton.ripple.hideDuration,
container,
[] { Window::Theme::Editor::Start(); }));
@@ -670,7 +665,7 @@ void SetupThemeOptions(not_null<Ui::VerticalLayout*> container) {
object_ptr<Button>(
container,
Lang::Viewer(lng_settings_bg_use_default),
st::settingsChatButton))
st::settingsButton))
)->toggleOn(rpl::single(
Window::Theme::SuggestThemeReset()
) | rpl::then(base::ObservableViewer(