Skip to content

Commit

Permalink
Removed obsolete DesktopNotificationManagerCompat
Browse files Browse the repository at this point in the history
  • Loading branch information
mykhailopylyp committed Jul 12, 2021
1 parent 62d4e3e commit 5177dfc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.

This file was deleted.

11 changes: 1 addition & 10 deletions src/modules/launcher/PowerLauncher/PublicAPIInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM
_themeManager = themeManager ?? throw new ArgumentNullException(nameof(themeManager));
_themeManager.ThemeChanged += OnThemeChanged;
WebRequest.RegisterPrefix("data", new DataWebRequestFactory());

#pragma warning disable CS0618 // Type or member is obsolete
DesktopNotificationManagerCompat.RegisterActivator<LauncherNotificationActivator>();
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning disable CS0618 // Type or member is obsolete
DesktopNotificationManagerCompat.RegisterAumidAndComServer<LauncherNotificationActivator>("PowerToysRun");
#pragma warning restore CS0618 // Type or member is obsolete
}

public void ChangeQuery(string query, bool requery = false)
Expand Down Expand Up @@ -100,9 +93,7 @@ public void ShowNotification(string text, string secondaryText = null)
Application.Current.Dispatcher.Invoke(() =>
{
var toast = new ToastNotification(builder.GetToastContent().GetXml());
#pragma warning disable CS0618 // Type or member is obsolete
DesktopNotificationManagerCompat.CreateToastNotifier().Show(toast);
#pragma warning restore CS0618 // Type or member is obsolete
ToastNotificationManagerCompat.CreateToastNotifier().Show(toast);
});
}

Expand Down

0 comments on commit 5177dfc

Please sign in to comment.