mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
rename variable Count to CommandHistory
This commit is contained in:
parent
ab52859461
commit
4abddb2597
2 changed files with 6 additions and 6 deletions
|
|
@ -102,7 +102,7 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
|
||||
private List<Result> GetHistoryCmds(string cmd, Result result)
|
||||
{
|
||||
IEnumerable<Result> history = _settings.Count.Where(o => o.Key.Contains(cmd))
|
||||
IEnumerable<Result> history = _settings.CommandHistory.Where(o => o.Key.Contains(cmd))
|
||||
.OrderByDescending(o => o.Value)
|
||||
.Select(m =>
|
||||
{
|
||||
|
|
@ -148,7 +148,7 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
|
||||
private List<Result> ResultsFromlHistory()
|
||||
{
|
||||
IEnumerable<Result> history = _settings.Count.OrderByDescending(o => o.Value)
|
||||
IEnumerable<Result> history = _settings.CommandHistory.OrderByDescending(o => o.Value)
|
||||
.Select(m => new Result
|
||||
{
|
||||
Title = m.Key,
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
public bool LeaveShellOpen { get; set; }
|
||||
public bool RunAsAdministrator { get; set; } = true;
|
||||
|
||||
public Dictionary<string, int> Count { get; set; } = new Dictionary<string, int>();
|
||||
public Dictionary<string, int> CommandHistory { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
public void AddCmdHistory(string cmdName)
|
||||
{
|
||||
if (Count.ContainsKey(cmdName))
|
||||
if (CommandHistory.ContainsKey(cmdName))
|
||||
{
|
||||
Count[cmdName] += 1;
|
||||
CommandHistory[cmdName] += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Count.Add(cmdName, 1);
|
||||
CommandHistory.Add(cmdName, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue