diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs index c20800d1c1b8..ce7119976303 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs @@ -88,7 +88,7 @@ internal static string wox_plugin_service_name { } /// - /// Looks up a localized string similar to Open services (Ctrl+O). + /// Looks up a localized string similar to Open services. /// internal static string wox_plugin_service_open_services { get { @@ -133,7 +133,7 @@ internal static string wox_plugin_service_plugin_name { } /// - /// Looks up a localized string similar to Restart (Ctrl+R). + /// Looks up a localized string similar to Restart. /// internal static string wox_plugin_service_restart { get { diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Settings.cs b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Settings.cs index 39d3b1f85504..7f877664bd09 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Settings.cs +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Settings.cs @@ -118,6 +118,10 @@ public SettingsContentPage(Settings settings) _settings = settings; Name = "Settings"; Icon = new IconInfo("\uE713"); // Settings icon + + // When our settings change, make sure to let CmdPal know to + // retrieve the new forms + _settings.SettingsChanged += (s, e) => RaiseItemsChanged(); } } diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/SettingsForm.cs b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/SettingsForm.cs index fa23cd8f0d32..79f548bf5605 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/SettingsForm.cs +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/SettingsForm.cs @@ -24,6 +24,12 @@ public override ICommandResult SubmitForm(string inputs, string data) return CommandResult.KeepOpen(); } + // Re-render the current value of the settings to a card. The + // SettingsContentPage will raise an ItemsChanged in its own + // SettingsChange handler, so we need to be prepared to return the + // current settings value. + TemplateJson = _settings.ToFormJson(); + _settings.Update(inputs); _settings.RaiseSettingsChanged();