@@ -34,7 +34,7 @@ public FlowLauncherJsonStorageTopMostRecord()
34
34
}
35
35
catch
36
36
{
37
- // Ignored
37
+ // Ignored - Flow will delete the old data during next startup
38
38
}
39
39
_topMostRecord = _topMostRecordStorage . Load ( ) ;
40
40
}
@@ -52,7 +52,7 @@ public FlowLauncherJsonStorageTopMostRecord()
52
52
}
53
53
catch
54
54
{
55
- // Ignored
55
+ // Ignored - Flow will delete the old data during next startup
56
56
}
57
57
Save ( ) ;
58
58
}
@@ -84,7 +84,10 @@ public void AddOrUpdate(Result result)
84
84
}
85
85
}
86
86
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
88
91
{
89
92
[ JsonInclude ]
90
93
public ConcurrentDictionary < string , Record > records { get ; private set ; } = new ( ) ;
@@ -135,7 +138,10 @@ internal void AddOrUpdate(Result result)
135
138
}
136
139
}
137
140
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
139
145
{
140
146
[ JsonInclude ]
141
147
[ JsonConverter ( typeof ( ConcurrentDictionaryConcurrentBagConverter ) ) ]
@@ -246,7 +252,7 @@ internal void AddOrUpdate(Result result)
246
252
/// <summary>
247
253
/// Because ConcurrentBag does not support serialization, we need to convert it to a List
248
254
/// </summary>
249
- public class ConcurrentDictionaryConcurrentBagConverter : JsonConverter < ConcurrentDictionary < string , ConcurrentBag < Record > > >
255
+ internal class ConcurrentDictionaryConcurrentBagConverter : JsonConverter < ConcurrentDictionary < string , ConcurrentBag < Record > > >
250
256
{
251
257
public override ConcurrentDictionary < string , ConcurrentBag < Record > > Read ( ref Utf8JsonReader reader , Type typeToConvert , JsonSerializerOptions options )
252
258
{
@@ -270,7 +276,7 @@ public override void Write(Utf8JsonWriter writer, ConcurrentDictionary<string, C
270
276
}
271
277
}
272
278
273
- public class Record
279
+ internal class Record
274
280
{
275
281
public string Title { get ; init ; }
276
282
public string SubTitle { get ; init ; }
0 commit comments