From 8295f805c8f841a23a713700a3782651427975ba Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Tue, 5 May 2020 06:51:04 +0300 Subject: [PATCH] Automatic action in RadioBox after saving --- Telegram/SourceFiles/kotato/boxes/radio_box.cpp | 2 ++ Telegram/SourceFiles/kotato/settings_menu.cpp | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/kotato/boxes/radio_box.cpp b/Telegram/SourceFiles/kotato/boxes/radio_box.cpp index 2d3cb7a91..f02aa31ee 100644 --- a/Telegram/SourceFiles/kotato/boxes/radio_box.cpp +++ b/Telegram/SourceFiles/kotato/boxes/radio_box.cpp @@ -91,6 +91,7 @@ void RadioBox::save() { if (_warnRestart) { const auto saveAfterWarn = [=] { _saveCallback(_group->value()); + App::restart(); }; const auto box = std::make_shared>(); @@ -103,6 +104,7 @@ void RadioBox::save() { saveAfterWarn)); } else { _saveCallback(_group->value()); + closeBox(); } } diff --git a/Telegram/SourceFiles/kotato/settings_menu.cpp b/Telegram/SourceFiles/kotato/settings_menu.cpp index e831b33c3..3c78a9132 100644 --- a/Telegram/SourceFiles/kotato/settings_menu.cpp +++ b/Telegram/SourceFiles/kotato/settings_menu.cpp @@ -253,7 +253,6 @@ void SetupKotatoChats(not_null container) { [=] (int value) { cSetUserpicCornersType(value); ::Kotato::JsonSettings::Write(); - App::restart(); }, true)); }); @@ -325,7 +324,6 @@ void SetupKotatoNetwork(not_null container) { [=] (int value) { SetNetworkBoost(value); ::Kotato::JsonSettings::Write(); - App::restart(); }, true)); }); @@ -377,7 +375,6 @@ void SetupKotatoSystem(not_null container) { [=] (int value) { cSetCustomAppIcon(value); ::Kotato::JsonSettings::Write(); - App::restart(); }, true)); });