From 53e305d76544ef07f65c5c0e254b98214a408e44 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 6 Aug 2021 18:52:09 +1000 Subject: [PATCH] update per review --- .../Views/ActionKeywordSetting.xaml.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs index 14db6d473..dfac163bc 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs @@ -63,23 +63,17 @@ namespace Flow.Launcher.Plugin.Explorer.Views } - if (ActionKeyword == Query.GlobalPluginWildcardSign - && (CurrentActionKeyword.KeywordProperty == Settings.ActionKeyword.FileContentSearchActionKeyword - || CurrentActionKeyword.KeywordProperty == Settings.ActionKeyword.QuickAccessActionKeyword)) - { + if (ActionKeyword == Query.GlobalPluginWildcardSign) switch (CurrentActionKeyword.KeywordProperty) { case Settings.ActionKeyword.FileContentSearchActionKeyword: MessageBox.Show(settingsViewModel.Context.API.GetTranslation("plugin_explorer_globalActionKeywordInvalid")); - break; + return; case Settings.ActionKeyword.QuickAccessActionKeyword: MessageBox.Show(settingsViewModel.Context.API.GetTranslation("plugin_explorer_quickaccess_globalActionKeywordInvalid")); - break; + return; } - return; - } - var oldActionKeyword = CurrentActionKeyword.Keyword; // == because of nullable @@ -92,7 +86,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views switch (Enabled) { // reset to global so it does not take up an action keyword when disabled - // not for null Enable plugin + // not for null Enable plugin case false when oldActionKeyword != Query.GlobalPluginWildcardSign: settingsViewModel.UpdateActionKeyword(CurrentActionKeyword.KeywordProperty, Query.GlobalPluginWildcardSign, oldActionKeyword);