mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve code quality
This commit is contained in:
parent
c3c6126bab
commit
c665482cb7
1 changed files with 3 additions and 2 deletions
|
|
@ -12,13 +12,14 @@ namespace Flow.Launcher.Storage
|
|||
|
||||
internal bool IsTopMost(Result result)
|
||||
{
|
||||
if (records.IsEmpty || (result.OriginQuery != null && !records.ContainsKey(result.OriginQuery.RawQuery)))
|
||||
if (records.IsEmpty || result.OriginQuery == null ||
|
||||
!records.TryGetValue(result.OriginQuery.RawQuery, out var value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// since this dictionary should be very small (or empty) going over it should be pretty fast.
|
||||
return result.OriginQuery != null && records[result.OriginQuery.RawQuery].Equals(result);
|
||||
return value.Equals(result);
|
||||
}
|
||||
|
||||
internal void Remove(Result result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue