diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs index f7459dc40..aaf7194e7 100644 --- a/Flow.Launcher/Storage/TopMostRecord.cs +++ b/Flow.Launcher/Storage/TopMostRecord.cs @@ -188,6 +188,12 @@ namespace Flow.Launcher.Storage { value.TryTake(out recordToRemove); } + + // if the bag is empty, remove the bag from the dictionary + if (value.IsEmpty) + { + records.TryRemove(result.OriginQuery.RawQuery, out _); + } } internal void AddOrUpdate(Result result)