From 1cafae827889ac0520cd16e06512d447e3bcf604 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:43:17 -0500 Subject: [PATCH 01/10] Allow nullable for Configuration --- Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs index b87623c56..1b14597a4 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs @@ -10,7 +10,7 @@ namespace Flow.Launcher.Core.Plugin { public class JsonRPCPluginSettings { - public required JsonRpcConfigurationModel Configuration { get; init; } + public required JsonRpcConfigurationModel? Configuration { get; init; } public required string SettingPath { get; init; } public Dictionary SettingControls { get; } = new(); From 93100c0330b19d4861d6bb466f7468b8405866b6 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:43:42 -0500 Subject: [PATCH 02/10] Remove missing template file short circuit logic --- Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs index 330120c12..197932f04 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs @@ -126,8 +126,6 @@ namespace Flow.Launcher.Core.Plugin private async Task InitSettingAsync() { - if (!File.Exists(SettingConfigurationPath)) - return; var deserializer = new DeserializerBuilder().WithNamingConvention(CamelCaseNamingConvention.Instance) .Build(); From b67e815022416cc30b8aae926ef9216a08eecfa7 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:44:01 -0500 Subject: [PATCH 03/10] Load template file only if exists --- Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs index 197932f04..c6b56c81d 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs @@ -126,12 +126,15 @@ namespace Flow.Launcher.Core.Plugin private async Task InitSettingAsync() { + JsonRpcConfigurationModel configuration = null; + if (File.Exists(SettingConfigurationPath)) + { + var deserializer = new DeserializerBuilder().WithNamingConvention(CamelCaseNamingConvention.Instance).Build(); + configuration = + deserializer.Deserialize( + await File.ReadAllTextAsync(SettingConfigurationPath)); + } - var deserializer = new DeserializerBuilder().WithNamingConvention(CamelCaseNamingConvention.Instance) - .Build(); - var configuration = - deserializer.Deserialize( - await File.ReadAllTextAsync(SettingConfigurationPath)); Settings ??= new JsonRPCPluginSettings { From 388688e89c26d74490ac377e17f41a2b7765241e Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:44:27 -0500 Subject: [PATCH 04/10] Short circuit template UI process if doesn't exist --- Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs index 1b14597a4..e26f5e7a7 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs @@ -36,6 +36,11 @@ namespace Flow.Launcher.Core.Plugin _storage = new JsonStorage>(SettingPath); Settings = await _storage.LoadAsync(); + if (Settings != null) + { + return; + } + foreach (var (type, attributes) in Configuration.Body) { if (attributes.Name == null) From ba9aba2bff27a94810496be498271d244bf1538c Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:45:16 -0500 Subject: [PATCH 05/10] Allow new setting keys to be instantiated --- Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs index e26f5e7a7..842a91919 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs @@ -63,10 +63,7 @@ namespace Flow.Launcher.Core.Plugin foreach (var (key, value) in settings) { - if (Settings.ContainsKey(key)) - { - Settings[key] = value; - } + Settings[key] = value; if (SettingControls.TryGetValue(key, out var control)) { From 5c90946a6ee99df8973096fdba3d8d69b7b3617b Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:45:24 -0500 Subject: [PATCH 06/10] Save to file on update --- Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs index 842a91919..06d9f8dec 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs @@ -83,6 +83,7 @@ namespace Flow.Launcher.Core.Plugin break; } } + Save(); } } From a86e7bcaa9ed3e9a0b456bea6708f0e8b24e1442 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:15:39 -0500 Subject: [PATCH 07/10] Remove save function from loop --- Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs index 06d9f8dec..43215bdd5 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs @@ -83,8 +83,8 @@ namespace Flow.Launcher.Core.Plugin break; } } - Save(); } + Save(); } public async Task SaveAsync() From bf1e451351529ae4a65598faa0da6a9f376f4de7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 22:19:24 +0000 Subject: [PATCH 08/10] Bump System.Drawing.Common from 7.0.0 to 8.0.0 Bumps [System.Drawing.Common](https://github.com/dotnet/winforms) from 7.0.0 to 8.0.0. - [Release notes](https://github.com/dotnet/winforms/releases) - [Changelog](https://github.com/dotnet/winforms/blob/main/docs/release-activity.md) - [Commits](https://github.com/dotnet/winforms/commits/v8.0.0) --- updated-dependencies: - dependency-name: System.Drawing.Common dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .../Flow.Launcher.Infrastructure.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 2f5259039..8124a95de 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -58,7 +58,7 @@ - + From 6a302c928a3c15d5a97d00e69569413db7650f94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 22:19:33 +0000 Subject: [PATCH 09/10] Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.7.2 to 17.8.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.7.2...v17.8.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index c662fdeff..29414baa6 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -54,7 +54,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file From a04bcce91e3dfbbfb98de891a118f0e1375c2a75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 22:19:39 +0000 Subject: [PATCH 10/10] Bump Microsoft.Data.Sqlite from 7.0.13 to 8.0.0 Bumps [Microsoft.Data.Sqlite](https://github.com/dotnet/efcore) from 7.0.13 to 8.0.0. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.13...v8.0.0) --- updated-dependencies: - dependency-name: Microsoft.Data.Sqlite dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .../Flow.Launcher.Plugin.BrowserBookmark.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index edaa3dd29..4ce8584fc 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -56,7 +56,7 @@ - + \ No newline at end of file