Skip to content

Commit 0387bfb

Browse files
committed
update class name
1 parent 6ec151a commit 0387bfb

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
namespace Flow.Launcher.Infrastructure.Storage
55
{
6-
public class PluginJsonSettingStorage<T> :JsonStorage<T> where T : new()
6+
public class PluginJsonStorage<T> :JsonStorage<T> where T : new()
77
{
8-
public PluginJsonSettingStorage()
8+
public PluginJsonStorage()
99
{
1010
// C# related, add python related below
1111
var dataType = typeof(T);
@@ -16,25 +16,10 @@ public PluginJsonSettingStorage()
1616
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
1717
}
1818

19-
public PluginJsonSettingStorage(T data) : this()
19+
public PluginJsonStorage(T data) : this()
2020
{
2121
_data = data;
2222
}
2323
}
24-
25-
public class PluginJsonStorage<T> : JsonStrorage<T> where T : new()
26-
{
27-
public PluginJsonStorage()
28-
{
29-
// C# releated, add python releated below
30-
var dataType = typeof(T);
31-
var assemblyName = typeof(T).Assembly.GetName().Name;
32-
DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName, Constant.Plugins, assemblyName);
33-
Helper.ValidateDirectory(DirectoryPath);
34-
35-
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
36-
}
37-
}
38-
3924
}
4025

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void SavePluginSettings()
177177
public void SaveJsonStorage<T>(T settings) where T : new()
178178
{
179179
var type = typeof(T);
180-
_pluginJsonStorages[type] = new PluginJsonSettingStorage<T>(settings);
180+
_pluginJsonStorages[type] = new PluginJsonStorage<T>(settings);
181181

182182
((PluginJsonStorage<T>) _pluginJsonStorages[type]).Save();
183183
}

0 commit comments

Comments
 (0)