Remove connection manager.
This commit is contained in:
@@ -119,13 +119,10 @@ public sealed partial class App : WinoApplication, IRecipient<NewCalendarSynchro
|
||||
if (appServiceTriggerDetails.CallerPackageFamilyName == Package.Current.Id.FamilyName)
|
||||
{
|
||||
// Connection established from the fulltrust process
|
||||
// This is no longer needed with the empty connection manager implementation
|
||||
|
||||
connectionBackgroundTaskDeferral = args.TaskInstance.GetDeferral();
|
||||
args.TaskInstance.Canceled += OnConnectionBackgroundTaskCanceled;
|
||||
|
||||
AppServiceConnectionManager.Connection = appServiceTriggerDetails.AppServiceConnection;
|
||||
|
||||
WeakReferenceMessenger.Default.Send(new WinoServerConnectionEstablished());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,22 +135,12 @@ public sealed partial class App : WinoApplication, IRecipient<NewCalendarSynchro
|
||||
|
||||
connectionBackgroundTaskDeferral?.Complete();
|
||||
connectionBackgroundTaskDeferral = null;
|
||||
|
||||
AppServiceConnectionManager.Connection = null;
|
||||
}
|
||||
|
||||
public async void Receive(NewCalendarSynchronizationRequested message)
|
||||
{
|
||||
try
|
||||
{
|
||||
var synchronizationResultResponse = await AppServiceConnectionManager.GetResponseAsync<CalendarSynchronizationResult, NewCalendarSynchronizationRequested>(message);
|
||||
synchronizationResultResponse.ThrowIfFailed();
|
||||
}
|
||||
catch (WinoServerException serverException)
|
||||
{
|
||||
var dialogService = Services.GetService<ICalendarDialogService>();
|
||||
|
||||
dialogService.InfoBarMessage(Translator.Info_SyncFailedTitle, serverException.Message, InfoBarMessageType.Error);
|
||||
}
|
||||
// Synchronization is no longer performed through the server connection manager
|
||||
// This method is kept for compatibility but doesn't perform any actual work
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,13 +57,11 @@
|
||||
Grid.ColumnSpan="2"
|
||||
BackButtonClicked="AppBarBackButtonClicked"
|
||||
Canvas.ZIndex="150"
|
||||
ConnectionStatus="{x:Bind ViewModel.ActiveConnectionStatus, Mode=OneWay}"
|
||||
CoreWindowText="Wino Calendar"
|
||||
IsBackButtonVisible="{x:Bind ViewModel.StatePersistenceService.IsBackButtonVisible, Mode=OneWay}"
|
||||
IsNavigationPaneOpen="{x:Bind MainSplitView.IsPaneOpen, Mode=TwoWay}"
|
||||
NavigationViewDisplayMode="{x:Bind helpers:XamlHelpers.NavigationViewDisplayModeConverter(MainSplitView.DisplayMode), Mode=OneWay}"
|
||||
OpenPaneLength="{x:Bind ViewModel.StatePersistenceService.OpenPaneLength, Mode=OneWay}"
|
||||
ReconnectCommand="{x:Bind ViewModel.ReconnectServerCommand}"
|
||||
ShrinkShellContentOnExpansion="False"
|
||||
SystemReserved="180">
|
||||
<coreControls:WinoAppTitleBar.ShellFrameContent>
|
||||
|
||||
Reference in New Issue
Block a user