Skip to content

Commit d96f4e1

Browse files
committed
Remove uneeded path caching
1 parent d34a9a2 commit d96f4e1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Flow.Launcher.Plugin.OneNote/ResultCreator.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class ResultCreator
1717
private readonly PluginInitContext context;
1818
private readonly Settings settings;
1919
private readonly IconProvider iconProvider;
20-
private readonly ConcurrentDictionary<RelativePathKey, string> relativePaths = [];
2120

2221
private const string PathSeparator = " > ";
2322
private const string BulletPoint = "\u2022 ";
@@ -30,9 +29,7 @@ public ResultCreator(PluginInitContext context, Settings settings, IconProvider
3029
this.context = context;
3130
}
3231

33-
private readonly record struct RelativePathKey(IOneNoteItem Item, string Separator);
34-
private string GetNicePath(IOneNoteItem item, string separator = PathSeparator)
35-
=> relativePaths.GetOrAdd(new RelativePathKey(item, separator), v => v.Item.GetRelativePath(false, v.Separator));
32+
private static string GetNicePath(IOneNoteItem item, string separator = PathSeparator) => item.GetRelativePath(false, separator);
3633

3734
private string GetTitle(IOneNoteItem item, List<int>? highlightData)
3835
{

0 commit comments

Comments
 (0)