diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index bd4360a41..72b02052d 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -222,7 +222,7 @@ namespace Flow.Launcher.Plugin.Sys Process.Start("shutdown", "/s /t 0"); } return true; - } + } }, new Result { @@ -238,15 +238,15 @@ namespace Flow.Launcher.Plugin.Sys Localize.flowlauncher_plugin_sys_restart_computer(), MessageBoxButton.YesNo, MessageBoxImage.Warning); - if (result == MessageBoxResult.Yes) - { - Context.API.SaveAppAllSettings(); - if (EnableShutdownPrivilege()) - PInvoke.ExitWindowsEx(EXIT_WINDOWS_FLAGS.EWX_REBOOT, REASON); - else - Process.Start("shutdown", "/r /t 0"); - } - return true; + if (result == MessageBoxResult.Yes) + { + Context.API.SaveAppAllSettings(); + if (EnableShutdownPrivilege()) + PInvoke.ExitWindowsEx(EXIT_WINDOWS_FLAGS.EWX_REBOOT, REASON); + else + Process.Start("shutdown", "/r /t 0"); + } + return true; } }, new Result diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Settings.cs b/Plugins/Flow.Launcher.Plugin.Sys/Settings.cs index dc6bf9b4e..c24c51961 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Settings.cs @@ -130,7 +130,12 @@ public class Settings : BaseModel get => _skipPowerActionConfirmation; set { + if (_skipPowerActionConfirmation == value) + { + return; + } _skipPowerActionConfirmation = value; + OnPropertyChanged(); } } }