From 8a18f7d0694d4da27a92c52444a63ad1735a3c89 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 23 Jan 2026 13:24:05 +0100 Subject: [PATCH] Fixed region handling --- .../Layout/MainLayout.razor.cs | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/app/MindWork AI Studio/Layout/MainLayout.razor.cs b/app/MindWork AI Studio/Layout/MainLayout.razor.cs index 83ca96f0..faae40b2 100644 --- a/app/MindWork AI Studio/Layout/MainLayout.razor.cs +++ b/app/MindWork AI Studio/Layout/MainLayout.razor.cs @@ -117,31 +117,6 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, ILan await base.OnInitializedAsync(); } - /// - /// Registers global shortcuts based on the current configuration. - /// - private async Task RegisterGlobalShortcuts() - { - // Only register the voice recording shortcut if the preview feature is enabled: - if (PreviewFeatures.PRE_SPEECH_TO_TEXT_2026.IsEnabled(this.SettingsManager)) - { - var shortcut = this.SettingsManager.ConfigurationData.App.ShortcutVoiceRecording; - if (!string.IsNullOrWhiteSpace(shortcut)) - { - var success = await this.RustService.UpdateGlobalShortcut("voice_recording_toggle", shortcut); - if (success) - this.Logger.LogInformation("Global voice recording shortcut '{Shortcut}' registered successfully.", shortcut); - else - this.Logger.LogWarning("Failed to register global voice recording shortcut '{Shortcut}'.", shortcut); - } - } - } - - private void LoadNavItems() - { - this.navItems = new List(this.GetNavItems()); - } - #endregion #region Implementation of ILang @@ -272,6 +247,31 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, ILan #endregion + /// + /// Registers global shortcuts based on the current configuration. + /// + private async Task RegisterGlobalShortcuts() + { + // Only register the voice recording shortcut if the preview feature is enabled: + if (PreviewFeatures.PRE_SPEECH_TO_TEXT_2026.IsEnabled(this.SettingsManager)) + { + var shortcut = this.SettingsManager.ConfigurationData.App.ShortcutVoiceRecording; + if (!string.IsNullOrWhiteSpace(shortcut)) + { + var success = await this.RustService.UpdateGlobalShortcut("voice_recording_toggle", shortcut); + if (success) + this.Logger.LogInformation("Global voice recording shortcut '{Shortcut}' registered successfully.", shortcut); + else + this.Logger.LogWarning("Failed to register global voice recording shortcut '{Shortcut}'.", shortcut); + } + } + } + + private void LoadNavItems() + { + this.navItems = new List(this.GetNavItems()); + } + private IEnumerable GetNavItems() { var palette = this.ColorTheme.GetCurrentPalette(this.SettingsManager);