Fix typo.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Wino.Core.UWP.Services
|
||||
{
|
||||
public class WinoServerConnectionManager :
|
||||
IWinoServerConnectionManager<AppServiceConnection>,
|
||||
IRecipient<WinoServerConnectionEstrablished>
|
||||
IRecipient<WinoServerConnectionEstablished>
|
||||
{
|
||||
private const int ServerConnectionTimeoutMs = 5000;
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Wino.Core.UWP.Services
|
||||
|
||||
// Connection establishment handler is in App.xaml.cs OnBackgroundActivated.
|
||||
// Once the connection is established, the handler will set the Connection property
|
||||
// and WinoServerConnectionEstrablished will be fired by the messenger.
|
||||
// and WinoServerConnectionEstablished will be fired by the messenger.
|
||||
|
||||
await _connectionTaskCompletionSource.Task.WaitAsync(connectionCancellationToken.Token);
|
||||
}
|
||||
@@ -305,7 +305,7 @@ namespace Wino.Core.UWP.Services
|
||||
}
|
||||
}
|
||||
|
||||
public void Receive(WinoServerConnectionEstrablished message)
|
||||
public void Receive(WinoServerConnectionEstablished message)
|
||||
{
|
||||
if (_connectionTaskCompletionSource != null)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using Microsoft.AppCenter;
|
||||
using Microsoft.AppCenter.Analytics;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Nito.AsyncEx;
|
||||
using Serilog;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
@@ -146,7 +147,6 @@ namespace Wino
|
||||
private void RegisterActivationHandlers(IServiceCollection services)
|
||||
{
|
||||
services.AddTransient<ProtocolActivationHandler>();
|
||||
// services.AddTransient<BackgroundActivationHandler>();
|
||||
services.AddTransient<ToastNotificationActivationHandler>();
|
||||
services.AddTransient<FileActivationHandler>();
|
||||
}
|
||||
@@ -283,19 +283,18 @@ namespace Wino
|
||||
|
||||
_appServiceConnectionManager.Connection = appServiceTriggerDetails.AppServiceConnection;
|
||||
|
||||
WeakReferenceMessenger.Default.Send(new WinoServerConnectionEstrablished());
|
||||
WeakReferenceMessenger.Default.Send(new WinoServerConnectionEstablished());
|
||||
}
|
||||
}
|
||||
else if (args.TaskInstance.TriggerDetails is ToastNotificationActionTriggerDetail toastNotificationActionTriggerDetail)
|
||||
{
|
||||
await InitializeServicesAsync();
|
||||
|
||||
// Notification action is triggered and the app is not running.
|
||||
|
||||
toastActionBackgroundTaskDeferral = args.TaskInstance.GetDeferral();
|
||||
|
||||
args.TaskInstance.Canceled += OnToastActionClickedBackgroundTaskCanceled;
|
||||
|
||||
await InitializeServicesAsync();
|
||||
|
||||
var toastArguments = ToastArguments.Parse(toastNotificationActionTriggerDetail.Argument);
|
||||
|
||||
// All toast activation mail actions are handled here like mark as read or delete.
|
||||
@@ -364,13 +363,7 @@ namespace Wino
|
||||
|
||||
private bool IsInteractiveLaunchArgs(object args) => args is IActivatedEventArgs;
|
||||
|
||||
private async Task InitializeServicesAsync()
|
||||
{
|
||||
foreach (var service in initializeServices)
|
||||
{
|
||||
await service.InitializeAsync();
|
||||
}
|
||||
}
|
||||
private Task InitializeServicesAsync() => initializeServices.Select(a => a.InitializeAsync()).WhenAll();
|
||||
|
||||
private async Task ActivateWinoAsync(object args)
|
||||
{
|
||||
@@ -428,7 +421,7 @@ namespace Wino
|
||||
{
|
||||
sender.Canceled -= OnConnectionBackgroundTaskCanceled;
|
||||
|
||||
Log.Information($"Background task {sender.Task.Name} was canceled. Reason: {reason}");
|
||||
Log.Information($"Server connection background task '{sender.Task.Name}' was canceled. Reason: {reason}");
|
||||
|
||||
await _appServiceConnectionManager.DisconnectAsync();
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
/// <summary>
|
||||
/// When client established a healthy connection to the server.
|
||||
/// </summary>
|
||||
public record WinoServerConnectionEstrablished;
|
||||
public record WinoServerConnectionEstablished;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user