Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into stefan/merge_pt_9
Browse files Browse the repository at this point in the history
stefansjfw committed Jan 29, 2025
2 parents 59381ee + 0931597 commit d387836
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
using Microsoft.UI.Xaml;
using Windows.ApplicationModel;
using Windows.ApplicationModel.AppExtensions;
using Windows.Foundation;
using Windows.Foundation.Collections;
using WindowsCommandPalette.Models;

@@ -18,6 +19,12 @@ public class ExtensionService : IExtensionService, IDisposable
{
public event EventHandler OnExtensionsChanged = (_, _) => { };

#pragma warning disable CS0067 // Never used
public event TypedEventHandler<IExtensionService, IEnumerable<IExtensionWrapper>>? OnExtensionAdded;

public event TypedEventHandler<IExtensionService, IEnumerable<IExtensionWrapper>>? OnExtensionRemoved;
#pragma warning restore

private static readonly PackageCatalog _catalog = PackageCatalog.OpenForCurrentUser();
private static readonly object _lock = new();
private readonly SemaphoreSlim _getInstalledExtensionsLock = new(1, 1);
Original file line number Diff line number Diff line change
@@ -35,11 +35,13 @@ public MainPage()
// LoadAllCommands().Wait();
LoadBuiltinCommandsAsync().Wait();

/* OnExtensionsChanged no longer exist
var extensionService = Application.Current.GetService<IExtensionService>();
if (extensionService != null)
{
extensionService.OnExtensionsChanged += ExtensionService_OnExtensionsChanged;
}
*/

_ = LoadExtensions();

0 comments on commit d387836

Please sign in to comment.