Skip to content

Commit 9df7201

Browse files
committed
Remove setting after uninstalling plugin
1 parent 52875da commit 9df7201

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Flow.Launcher.Infrastructure;
22
using Flow.Launcher.Infrastructure.Http;
33
using Flow.Launcher.Infrastructure.Logger;
4+
using Flow.Launcher.Infrastructure.Storage;
45
using Flow.Launcher.Infrastructure.UserSettings;
56
using Flow.Launcher.Plugin.PluginsManager.Models;
7+
using Flow.Launcher.Plugin.PluginsManager.ViewModels;
68
using Flow.Launcher.Plugin.SharedCommands;
79
using System;
810
using System.Collections.Generic;
@@ -400,6 +402,12 @@ internal List<Result> RequestUninstall(string search)
400402

401403
private void Uninstall(PluginMetadata plugin)
402404
{
405+
406+
407+
Core.Plugin.PluginManager.Settings.Plugins.Remove(plugin.ID);
408+
Core.Plugin.PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
409+
410+
403411
// Marked for deletion. Will be deleted on next start up
404412
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
405413
}

0 commit comments

Comments
 (0)