use most used cmds setting

This commit is contained in:
Jeremy Wu 2021-04-12 20:05:30 +10:00
parent 67097864fa
commit f053139454

View file

@ -124,7 +124,11 @@ namespace Flow.Launcher.Plugin.Shell
}
};
return ret;
}).Where(o => o != null).Take(4);
}).Where(o => o != null);
if (_settings.ShowOnlyMostUsedCMDs)
return history.Take(_settings.ShowOnlyMostUsedCMDsNumber).ToList();
return history.ToList();
}
@ -159,7 +163,11 @@ namespace Flow.Launcher.Plugin.Shell
Execute(Process.Start, PrepareProcessStartInfo(m.Key));
return true;
}
}).Take(5);
});
if (_settings.ShowOnlyMostUsedCMDs)
return history.Take(_settings.ShowOnlyMostUsedCMDsNumber).ToList();
return history.ToList();
}