diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs index b87623c56..fd73a44cd 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System.Collections.Concurrent; +using System.Collections.Generic; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; @@ -16,10 +17,10 @@ namespace Flow.Launcher.Core.Plugin public Dictionary SettingControls { get; } = new(); public IReadOnlyDictionary Inner => Settings; - protected Dictionary Settings { get; set; } + protected ConcurrentDictionary Settings { get; set; } public required IPublicAPI API { get; init; } - private JsonStorage> _storage; + private JsonStorage> _storage; // maybe move to resource? private static readonly Thickness settingControlMargin = new(0, 9, 18, 9); @@ -33,7 +34,7 @@ namespace Flow.Launcher.Core.Plugin public async Task InitializeAsync() { - _storage = new JsonStorage>(SettingPath); + _storage = new JsonStorage>(SettingPath); Settings = await _storage.LoadAsync(); foreach (var (type, attributes) in Configuration.Body)