From 9df72010370ce04a12dcb4e60155474010211d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Fri, 12 Feb 2021 23:47:21 +0800 Subject: [PATCH 1/5] Remove setting after uninstalling plugin --- .../Flow.Launcher.Plugin.PluginsManager.csproj | 1 + .../Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj index cb2507a2b..f94027bcc 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj @@ -18,6 +18,7 @@ + diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index 881872fc1..b2f18e39a 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -1,8 +1,10 @@ using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Http; using Flow.Launcher.Infrastructure.Logger; +using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin.PluginsManager.Models; +using Flow.Launcher.Plugin.PluginsManager.ViewModels; using Flow.Launcher.Plugin.SharedCommands; using System; using System.Collections.Generic; @@ -400,6 +402,12 @@ namespace Flow.Launcher.Plugin.PluginsManager private void Uninstall(PluginMetadata plugin) { + + + Core.Plugin.PluginManager.Settings.Plugins.Remove(plugin.ID); + Core.Plugin.PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID); + + // Marked for deletion. Will be deleted on next start up using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt")); } From 59a767fafbaf469978ce548b2b62d830489e2495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sat, 13 Feb 2021 12:22:59 +0800 Subject: [PATCH 2/5] remove unexpected space --- Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index b2f18e39a..4949c4e04 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -402,8 +402,6 @@ namespace Flow.Launcher.Plugin.PluginsManager private void Uninstall(PluginMetadata plugin) { - - Core.Plugin.PluginManager.Settings.Plugins.Remove(plugin.ID); Core.Plugin.PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID); From 0707ae39978019671683f7bd8650d9e0677d10f9 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 13 Feb 2021 21:03:26 +1100 Subject: [PATCH 3/5] fix formattng --- .../Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index 4949c4e04..90d103bc7 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -1,10 +1,9 @@ +using Flow.Launcher.Core.Plugin; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Http; using Flow.Launcher.Infrastructure.Logger; -using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin.PluginsManager.Models; -using Flow.Launcher.Plugin.PluginsManager.ViewModels; using Flow.Launcher.Plugin.SharedCommands; using System; using System.Collections.Generic; @@ -402,9 +401,8 @@ namespace Flow.Launcher.Plugin.PluginsManager private void Uninstall(PluginMetadata plugin) { - Core.Plugin.PluginManager.Settings.Plugins.Remove(plugin.ID); - Core.Plugin.PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID); - + PluginManager.Settings.Plugins.Remove(plugin.ID); + PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID); // Marked for deletion. Will be deleted on next start up using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt")); From 92f757c47ed44c8fc852aaf1198cd70bdfed66b5 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 13 Feb 2021 21:35:08 +1100 Subject: [PATCH 4/5] add restart notes --- Flow.Launcher/PublicAPIInstance.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 427fd9fc6..0afa67d1a 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -61,6 +61,9 @@ namespace Flow.Launcher // which will cause ungraceful exit SaveAppAllSettings(); + // Restart requires Squirrel's Update.exe to be present in the parent folder, + // it is only published from the project's release pipeline. When debugging without it, + // the project may not restart or just terminates. This is expected. UpdateManager.RestartApp(Constant.ApplicationFileName); } From 7c2c78733ef1dffcabf84aab39d813c54c259a99 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 13 Feb 2021 21:41:56 +1100 Subject: [PATCH 5/5] version bump PluginsManager --- Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json index ad4601586..4cba7ec83 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json @@ -6,7 +6,7 @@ "Name": "Plugins Manager", "Description": "Management of installing, uninstalling or updating Flow Launcher plugins", "Author": "Jeremy Wu", - "Version": "1.6.3", + "Version": "1.6.4", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",