Skip to content

Commit 9be546d

Browse files
committed
Fix ShowOnlyMostUsedCMDsNumber default value
1 parent aab213a commit 9be546d

File tree

1 file changed

+7
-1
lines changed
  • Plugins/Flow.Launcher.Plugin.Shell

1 file changed

+7
-1
lines changed

Plugins/Flow.Launcher.Plugin.Shell/Main.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,15 @@ public void Init(PluginInitContext context)
384384
Context = context;
385385
_settings = context.API.LoadSettingJsonStorage<Settings>();
386386
context.API.RegisterGlobalKeyboardCallback(API_GlobalKeyboardEvent);
387+
// Since the old Settings class set default value of ShowOnlyMostUsedCMDsNumber to 0 which is a wrong value,
388+
// we need to fix it here to make sure the default value is 5
389+
if (_settings.ShowOnlyMostUsedCMDsNumber == 0)
390+
{
391+
_settings.ShowOnlyMostUsedCMDsNumber = 5;
392+
}
387393
}
388394

389-
bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state)
395+
private bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state)
390396
{
391397
if (!Context.CurrentPluginMetadata.Disabled && _settings.ReplaceWinR)
392398
{

0 commit comments

Comments
 (0)