|
27 | 27 |
|
28 | 28 | namespace Coder.Desktop.App; |
29 | 29 |
|
30 | | -public partial class App : Application, IDispatcherQueueManager, INotificationHandler |
| 30 | +public partial class App : Application, IDispatcherQueueManager, IDefaultNotificationHandler |
31 | 31 | { |
32 | 32 | private const string MutagenControllerConfigSection = "MutagenController"; |
33 | 33 | private const string UpdaterConfigSection = "Updater"; |
@@ -91,7 +91,7 @@ public App() |
91 | 91 | services.AddSingleton<IAgentApiClientFactory, AgentApiClientFactory>(); |
92 | 92 |
|
93 | 93 | services.AddSingleton<IDispatcherQueueManager>(_ => this); |
94 | | - services.AddSingleton<INotificationHandler>(_ => this); |
| 94 | + services.AddSingleton<IDefaultNotificationHandler>(_ => this); |
95 | 95 | services.AddSingleton<ICredentialBackend>(_ => |
96 | 96 | new WindowsCredentialBackend(WindowsCredentialBackend.CoderCredentialsTargetName)); |
97 | 97 | services.AddSingleton<ICredentialManager, CredentialManager>(); |
@@ -337,12 +337,8 @@ public void RunInUiThread(DispatcherQueueHandler action) |
337 | 337 | dispatcherQueue.TryEnqueue(action); |
338 | 338 | } |
339 | 339 |
|
340 | | - public void HandleNotificationActivation(IDictionary<string, string> args) |
| 340 | + public void HandleNotificationActivation(IDictionary<string, string> _) |
341 | 341 | { |
342 | | - var app = (App)Current; |
343 | | - if (app != null && app.TrayWindow != null) |
344 | | - { |
345 | | - app.TrayWindow.Tray_Open(); |
346 | | - } |
| 342 | + TrayWindow?.Tray_Open(); |
347 | 343 | } |
348 | 344 | } |
0 commit comments