Fix restart confirmation box cancel.

This commit is contained in:
John Preston 2022-03-01 16:15:23 +03:00
parent 616d099c07
commit bcbd97e515
1 changed files with 2 additions and 1 deletions

View File

@ -394,11 +394,12 @@ void SetupInterfaceScale(
Local::writeSettings();
Core::Restart();
});
const auto cancelled = crl::guard(button, [=] {
const auto cancelled = crl::guard(button, [=](Fn<void()> close) {
base::call_delayed(
st::defaultSettingsSlider.duration,
button,
[=] { repeatSetScale(cConfigScale(), repeatSetScale); });
close();
});
window->show(Ui::MakeConfirmBox({
.text = tr::lng_settings_need_restart(),