diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs index d604eabc1..7c45bcf66 100644 --- a/Flow.Launcher/Storage/TopMostRecord.cs +++ b/Flow.Launcher/Storage/TopMostRecord.cs @@ -34,7 +34,7 @@ namespace Flow.Launcher.Storage } catch { - // Ignored + // Ignored - Flow will delete the old data during next startup } _topMostRecord = _topMostRecordStorage.Load(); } @@ -52,7 +52,7 @@ namespace Flow.Launcher.Storage } catch { - // Ignored + // Ignored - Flow will delete the old data during next startup } Save(); } @@ -84,7 +84,10 @@ namespace Flow.Launcher.Storage } } - public class TopMostRecord + /// + /// Old data structure to support only one top most record for the same query + /// + internal class TopMostRecord { [JsonInclude] public ConcurrentDictionary records { get; private set; } = new(); @@ -135,7 +138,10 @@ namespace Flow.Launcher.Storage } } - public class MultipleTopMostRecord + /// + /// New data structure to support multiple top most records for the same query + /// + internal class MultipleTopMostRecord { [JsonInclude] [JsonConverter(typeof(ConcurrentDictionaryConcurrentBagConverter))] @@ -246,7 +252,7 @@ namespace Flow.Launcher.Storage /// /// Because ConcurrentBag does not support serialization, we need to convert it to a List /// - public class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>> + internal class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>> { public override ConcurrentDictionary> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { @@ -270,7 +276,7 @@ namespace Flow.Launcher.Storage } } - public class Record + internal class Record { public string Title { get; init; } public string SubTitle { get; init; }