mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
@@ -462,16 +462,21 @@ void SetupSystemIntegrationContent(
|
||||
return (checked != cAutoStart());
|
||||
}) | rpl::start_with_next([=](bool checked) {
|
||||
cSetAutoStart(checked);
|
||||
psAutoStart(checked);
|
||||
if (checked) {
|
||||
Local::writeSettings();
|
||||
} else if (minimized->entity()->checked()) {
|
||||
minimized->entity()->setChecked(false);
|
||||
} else {
|
||||
Local::writeSettings();
|
||||
}
|
||||
Platform::AutostartToggle(checked, crl::guard(autostart, [=](
|
||||
bool enabled) {
|
||||
autostart->setChecked(enabled);
|
||||
if (enabled || !minimized->entity()->checked()) {
|
||||
Local::writeSettings();
|
||||
} else {
|
||||
minimized->entity()->setChecked(false);
|
||||
}
|
||||
}));
|
||||
}, autostart->lifetime());
|
||||
|
||||
Platform::AutostartRequestStateFromSystem(crl::guard(
|
||||
controller,
|
||||
[=](bool enabled) { autostart->setChecked(enabled); }));
|
||||
|
||||
minimized->toggleOn(autostart->checkedValue());
|
||||
minimized->entity()->checkedChanges(
|
||||
) | rpl::filter([=](bool checked) {
|
||||
|
Reference in New Issue
Block a user