@@ -34,7 +34,7 @@ public FlowLauncherJsonStorageTopMostRecord()
3434 }
3535 catch
3636 {
37- // Ignored
37+ // Ignored - Flow will delete the old data during next startup
3838 }
3939 _topMostRecord = _topMostRecordStorage . Load ( ) ;
4040 }
@@ -52,7 +52,7 @@ public FlowLauncherJsonStorageTopMostRecord()
5252 }
5353 catch
5454 {
55- // Ignored
55+ // Ignored - Flow will delete the old data during next startup
5656 }
5757 Save ( ) ;
5858 }
@@ -84,7 +84,10 @@ public void AddOrUpdate(Result result)
8484 }
8585 }
8686
87- public class TopMostRecord
87+ /// <summary>
88+ /// Old data structure to support only one top most record for the same query
89+ /// </summary>
90+ internal class TopMostRecord
8891 {
8992 [ JsonInclude ]
9093 public ConcurrentDictionary < string , Record > records { get ; private set ; } = new ( ) ;
@@ -135,7 +138,10 @@ internal void AddOrUpdate(Result result)
135138 }
136139 }
137140
138- public class MultipleTopMostRecord
141+ /// <summary>
142+ /// New data structure to support multiple top most records for the same query
143+ /// </summary>
144+ internal class MultipleTopMostRecord
139145 {
140146 [ JsonInclude ]
141147 [ JsonConverter ( typeof ( ConcurrentDictionaryConcurrentBagConverter ) ) ]
@@ -246,7 +252,7 @@ internal void AddOrUpdate(Result result)
246252 /// <summary>
247253 /// Because ConcurrentBag does not support serialization, we need to convert it to a List
248254 /// </summary>
249- public class ConcurrentDictionaryConcurrentBagConverter : JsonConverter < ConcurrentDictionary < string , ConcurrentBag < Record > > >
255+ internal class ConcurrentDictionaryConcurrentBagConverter : JsonConverter < ConcurrentDictionary < string , ConcurrentBag < Record > > >
250256 {
251257 public override ConcurrentDictionary < string , ConcurrentBag < Record > > Read ( ref Utf8JsonReader reader , Type typeToConvert , JsonSerializerOptions options )
252258 {
@@ -270,7 +276,7 @@ public override void Write(Utf8JsonWriter writer, ConcurrentDictionary<string, C
270276 }
271277 }
272278
273- public class Record
279+ internal class Record
274280 {
275281 public string Title { get ; init ; }
276282 public string SubTitle { get ; init ; }
0 commit comments