mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
updated user selected record
This commit is contained in:
parent
c90dd0e818
commit
b3fdc4bb96
1 changed files with 7 additions and 5 deletions
|
|
@ -12,21 +12,23 @@ namespace Wox.Storage
|
|||
|
||||
public void Add(Result result)
|
||||
{
|
||||
if (records.ContainsKey(result.ToString()))
|
||||
var key = result.ToString();
|
||||
if (records.TryGetValue(key, out int value))
|
||||
{
|
||||
records[result.ToString()] += 1;
|
||||
records[key] = value + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
records.Add(result.ToString(), 1);
|
||||
records.Add(key, 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public int GetSelectedCount(Result result)
|
||||
{
|
||||
if (records.ContainsKey(result.ToString()))
|
||||
if (records.TryGetValue(result.ToString(), out int value))
|
||||
{
|
||||
return records[result.ToString()];
|
||||
return value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue