Flow.Launcher/Plugins/Flow.Launcher.Plugin.Sys
Jack251970 167570559f Move settings save to post-confirmation for actions
Previously, `Context.API.SaveAppAllSettings()` was called unconditionally before user confirmation for shutdown, restart, and advanced restart actions. This change ensures settings are only saved if the user confirms the action by clicking "Yes" in the confirmation dialog.

For all three functionalities:
- Moved the settings save call inside the `if (result == MessageBoxResult.Yes)` block.
- Retained the existing logic for executing the respective system commands, with checks for `EnableShutdownPrivilege()` to determine whether to use `PInvoke.ExitWindowsEx` or the `shutdown` command.

This change prevents unnecessary settings saves when the user cancels the action.
2025-10-02 19:42:24 +08:00
..
Images Move Theme Selector into Sys plugin 2024-06-15 12:16:36 +01:00
Languages Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00
Command.cs Add command keyword change dialog & Support culture change 2025-03-13 23:29:00 +08:00
CommandKeywordSetting.xaml Add command keyword change dialog & Support culture change 2025-03-13 23:29:00 +08:00
CommandKeywordSetting.xaml.cs Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00
Flow.Launcher.Plugin.Sys.csproj Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00
Main.cs Move settings save to post-confirmation for actions 2025-10-02 19:42:24 +08:00
NativeMethods.txt Use PInvoke for const 2025-02-18 11:12:33 +08:00
plugin.json set all of plugins' version to default 1.0.0 2025-05-20 09:06:11 +00:00
Settings.cs Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00
SettingsViewModel.cs Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00
SysSettings.xaml Fix websearch plugin issue & Improve sys plugin settings panel 2025-03-16 20:22:21 +08:00
SysSettings.xaml.cs Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00
ThemeSelector.cs Code cleanup & Use Flow.Launcher.Localization to improve code quality (#4009) 2025-09-27 19:18:33 +03:00