Skip to content

Commit f2b7367

Browse files
authored
Merge pull request #336 from taooceros/PluginsManagerRemoveUninstalledSetting
Remove setting after uninstalling plugin
2 parents 52875da + 7c2c787 commit f2b7367

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public void RestartApp()
6161
// which will cause ungraceful exit
6262
SaveAppAllSettings();
6363

64+
// Restart requires Squirrel's Update.exe to be present in the parent folder,
65+
// it is only published from the project's release pipeline. When debugging without it,
66+
// the project may not restart or just terminates. This is expected.
6467
UpdateManager.RestartApp(Constant.ApplicationFileName);
6568
}
6669

Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
<ItemGroup>
2020
<ProjectReference Include="..\..\Flow.Launcher.Infrastructure\Flow.Launcher.Infrastructure.csproj" />
21+
<ProjectReference Include="..\..\Flow.Launcher.Core\Flow.Launcher.Core.csproj" />
2122
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
2223
</ItemGroup>
2324

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Flow.Launcher.Core.Plugin;
12
using Flow.Launcher.Infrastructure;
23
using Flow.Launcher.Infrastructure.Http;
34
using Flow.Launcher.Infrastructure.Logger;
@@ -400,6 +401,9 @@ internal List<Result> RequestUninstall(string search)
400401

401402
private void Uninstall(PluginMetadata plugin)
402403
{
404+
PluginManager.Settings.Plugins.Remove(plugin.ID);
405+
PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
406+
403407
// Marked for deletion. Will be deleted on next start up
404408
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
405409
}

Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Name": "Plugins Manager",
77
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
88
"Author": "Jeremy Wu",
9-
"Version": "1.6.3",
9+
"Version": "1.6.4",
1010
"Language": "csharp",
1111
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1212
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",

0 commit comments

Comments
 (0)