From 1fdd6aa875eb3d74eee4fd46aaf82a603d0db296 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 23 Jan 2026 14:16:48 +0100 Subject: [PATCH] Simplified voice recording shortcut update logic --- .../Components/ConfigurationShortcut.razor.cs | 4 ++-- .../Components/Settings/SettingsPanelApp.razor | 2 +- .../Components/Settings/SettingsPanelApp.razor.cs | 6 ------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/MindWork AI Studio/Components/ConfigurationShortcut.razor.cs b/app/MindWork AI Studio/Components/ConfigurationShortcut.razor.cs index 1bf605d2..c83369af 100644 --- a/app/MindWork AI Studio/Components/ConfigurationShortcut.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationShortcut.razor.cs @@ -27,7 +27,7 @@ public partial class ConfigurationShortcut : ConfigurationBaseCore /// An action which is called when the shortcut was changed. /// [Parameter] - public Func ShortcutUpdate { get; set; } = _ => Task.CompletedTask; + public Action ShortcutUpdate { get; set; } = _ => { }; /// /// The name/identifier of the shortcut (used for conflict detection and registration). @@ -94,7 +94,7 @@ public partial class ConfigurationShortcut : ConfigurationBaseCore if (dialogResult.Data is string newShortcut) { - await this.ShortcutUpdate(newShortcut); + this.ShortcutUpdate(newShortcut); await this.SettingsManager.StoreSettings(); await this.InformAboutChange(); } diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor index 5a1835e5..45fe4eea 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor @@ -33,6 +33,6 @@ @if (PreviewFeatures.PRE_SPEECH_TO_TEXT_2026.IsEnabled(this.SettingsManager)) { - + } \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor.cs b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor.cs index eae3fe59..2fbb61ed 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor.cs +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor.cs @@ -35,10 +35,4 @@ public partial class SettingsPanelApp : SettingsPanelBase this.SettingsManager.ConfigurationData.App.LanguagePluginId = pluginId; await this.MessageBus.SendMessage(this, Event.PLUGINS_RELOADED); } - - private async Task UpdateVoiceRecordingShortcut(string shortcut) - { - this.SettingsManager.ConfigurationData.App.ShortcutVoiceRecording = shortcut; - await this.RustService.UpdateGlobalShortcut("voice_recording_toggle", shortcut); - } } \ No newline at end of file