We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c49b3b7 commit 58b9f0cCopy full SHA for 58b9f0c
Flow.Launcher/Storage/TopMostRecord.cs
@@ -190,13 +190,16 @@ internal void Remove(Result result)
190
191
// remove the record from the bag
192
var bag = new ConcurrentQueue<Record>(value.Where(r => !r.Equals(result)));
193
- records[result.OriginQuery.RawQuery] = new ConcurrentBag<Record>(bag);
194
-
195
- // if the bag is empty, remove the bag from the dictionary
196
- if (value.IsEmpty)
+ if (bag.IsEmpty)
197
{
+ // if the bag is empty, remove the bag from the dictionary
198
records.TryRemove(result.OriginQuery.RawQuery, out _);
199
}
+ else
+ {
200
+ // change the bag in the dictionary
201
+ records[result.OriginQuery.RawQuery] = new ConcurrentBag<Record>(bag);
202
+ }
203
204
205
internal void AddOrUpdate(Result result)
0 commit comments