Skip to content

Commit 8b813fe

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into PluginAPIExpand
2 parents 4f35e62 + d223d2c commit 8b813fe

File tree

113 files changed

+1527
-2021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+1527
-2021
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,8 @@ migrateToAutomaticPackageRestore.ps1
300300
*.pyc
301301
*.diagsession
302302
Output-Performance.txt
303-
*.diff
303+
*.diff
304+
305+
# vscode
306+
.vscode
307+
.history
File renamed without changes.

Flow.Launcher.Core/Flow.Launcher.Core.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
<ItemGroup>
5656
<PackageReference Include="FSharp.Core" Version="4.7.1" />
5757
<PackageReference Include="squirrel.windows" Version="1.5.2" />
58-
<PackageReference Include="SharpZipLib" Version="1.2.0" />
5958
</ItemGroup>
6059

6160
<ItemGroup>

Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
using System.Diagnostics;
44
using System.IO;
55
using System.Reflection;
6+
using System.Text.Json;
67
using System.Threading;
78
using System.Threading.Tasks;
89
using System.Windows.Forms;
9-
using Newtonsoft.Json;
1010
using Flow.Launcher.Infrastructure.Exception;
1111
using Flow.Launcher.Infrastructure.Logger;
1212
using Flow.Launcher.Plugin;
@@ -65,7 +65,7 @@ private List<Result> DeserializedResult(string output)
6565
{
6666
List<Result> results = new List<Result>();
6767

68-
JsonRPCQueryResponseModel queryResponseModel = JsonConvert.DeserializeObject<JsonRPCQueryResponseModel>(output);
68+
JsonRPCQueryResponseModel queryResponseModel = JsonSerializer.Deserialize<JsonRPCQueryResponseModel>(output);
6969
if (queryResponseModel.Result == null) return null;
7070

7171
foreach (JsonRPCResult result in queryResponseModel.Result)
@@ -84,7 +84,7 @@ private List<Result> DeserializedResult(string output)
8484
else
8585
{
8686
string actionReponse = ExecuteCallback(result1.JsonRPCAction);
87-
JsonRPCRequestModel jsonRpcRequestModel = JsonConvert.DeserializeObject<JsonRPCRequestModel>(actionReponse);
87+
JsonRPCRequestModel jsonRpcRequestModel = JsonSerializer.Deserialize<JsonRPCRequestModel>(actionReponse);
8888
if (jsonRpcRequestModel != null
8989
&& !String.IsNullOrEmpty(jsonRpcRequestModel.Method)
9090
&& jsonRpcRequestModel.Method.StartsWith("Flow.Launcher."))

Flow.Launcher.Core/Plugin/PluginConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.IO;
5-
using Newtonsoft.Json;
65
using Flow.Launcher.Infrastructure;
76
using Flow.Launcher.Infrastructure.Logger;
87
using Flow.Launcher.Plugin;
8+
using System.Text.Json;
99

1010
namespace Flow.Launcher.Core.Plugin
1111
{
@@ -61,7 +61,7 @@ private static PluginMetadata GetPluginMetadata(string pluginDirectory)
6161
PluginMetadata metadata;
6262
try
6363
{
64-
metadata = JsonConvert.DeserializeObject<PluginMetadata>(File.ReadAllText(configPath));
64+
metadata = JsonSerializer.Deserialize<PluginMetadata>(File.ReadAllText(configPath));
6565
metadata.PluginDirectory = pluginDirectory;
6666
// for plugins which doesn't has ActionKeywords key
6767
metadata.ActionKeywords = metadata.ActionKeywords ?? new List<string> { metadata.ActionKeyword };

Flow.Launcher.Core/Plugin/PluginInstaller.cs

Lines changed: 0 additions & 169 deletions
This file was deleted.

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ public static void InitializePlugins(IPublicAPI api)
133133
}
134134
}
135135

136-
public static void InstallPlugin(string path)
137-
{
138-
PluginInstaller.Install(path);
139-
}
140-
141136
public static List<PluginPair> ValidPluginsForQuery(Query query)
142137
{
143138
if (NonGlobalPlugins.ContainsKey(query.ActionKeyword))

Flow.Launcher.Core/Resource/Internationalization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ public void ChangeLanguage(Language language)
8888
{
8989
language = language.NonNull();
9090

91-
Settings.Language = language.LanguageCode;
9291

9392
RemoveOldLanguageFiles();
9493
if (language != AvailableLanguages.English)
9594
{
9695
LoadLanguage(language);
9796
}
9897
UpdatePluginMetadataTranslations();
98+
Settings.Language = language.LanguageCode;
9999

100100
}
101101

0 commit comments

Comments
 (0)