55using Coder . Desktop . App . Views . Pages ;
66using CommunityToolkit . Mvvm . Input ;
77using Microsoft . UI ;
8- using Microsoft . UI . Input ;
98using Microsoft . UI . Windowing ;
109using Microsoft . UI . Xaml ;
1110using Microsoft . UI . Xaml . Controls ;
12- using Microsoft . UI . Xaml . Documents ;
1311using Microsoft . UI . Xaml . Media . Animation ;
1412using System ;
1513using System . Collections . Generic ;
1917using Windows . Graphics ;
2018using Windows . System ;
2119using Windows . UI . Core ;
20+ using Microsoft . UI . Input ;
2221using WinRT . Interop ;
2322using WindowActivatedEventArgs = Microsoft . UI . Xaml . WindowActivatedEventArgs ;
2423
@@ -41,7 +40,6 @@ public sealed partial class TrayWindow : Window
4140
4241 private readonly IRpcController _rpcController ;
4342 private readonly ICredentialManager _credentialManager ;
44- private readonly ISyncSessionController _syncSessionController ;
4543 private readonly IUpdateController _updateController ;
4644 private readonly IUserNotifier _userNotifier ;
4745 private readonly TrayWindowLoadingPage _loadingPage ;
@@ -51,15 +49,13 @@ public sealed partial class TrayWindow : Window
5149
5250 public TrayWindow (
5351 IRpcController rpcController , ICredentialManager credentialManager ,
54- ISyncSessionController syncSessionController , IUpdateController updateController ,
55- IUserNotifier userNotifier ,
52+ IUpdateController updateController , IUserNotifier userNotifier ,
5653 TrayWindowLoadingPage loadingPage ,
5754 TrayWindowDisconnectedPage disconnectedPage , TrayWindowLoginRequiredPage loginRequiredPage ,
5855 TrayWindowMainPage mainPage )
5956 {
6057 _rpcController = rpcController ;
6158 _credentialManager = credentialManager ;
62- _syncSessionController = syncSessionController ;
6359 _updateController = updateController ;
6460 _userNotifier = userNotifier ;
6561 _loadingPage = loadingPage ;
@@ -74,9 +70,7 @@ public TrayWindow(
7470
7571 _rpcController . StateChanged += RpcController_StateChanged ;
7672 _credentialManager . CredentialsChanged += CredentialManager_CredentialsChanged ;
77- _syncSessionController . StateChanged += SyncSessionController_StateChanged ;
78- SetPageByState ( _rpcController . GetState ( ) , _credentialManager . GetCachedCredentials ( ) ,
79- _syncSessionController . GetState ( ) ) ;
73+ SetPageByState ( _rpcController . GetState ( ) , _credentialManager . GetCachedCredentials ( ) ) ;
8074
8175 // Setting these directly in the .xaml doesn't seem to work for whatever reason.
8276 TrayIcon . OpenCommand = Tray_OpenCommand ;
@@ -127,8 +121,7 @@ public TrayWindow(
127121 } ;
128122 }
129123
130- private void SetPageByState ( RpcModel rpcModel , CredentialModel credentialModel ,
131- SyncSessionControllerStateModel syncSessionModel )
124+ private void SetPageByState ( RpcModel rpcModel , CredentialModel credentialModel )
132125 {
133126 if ( credentialModel . State == CredentialState . Unknown )
134127 {
@@ -201,18 +194,13 @@ private void MaybeNotifyUser(RpcModel rpcModel)
201194
202195 private void RpcController_StateChanged ( object ? _ , RpcModel model )
203196 {
204- SetPageByState ( model , _credentialManager . GetCachedCredentials ( ) , _syncSessionController . GetState ( ) ) ;
197+ SetPageByState ( model , _credentialManager . GetCachedCredentials ( ) ) ;
205198 MaybeNotifyUser ( model ) ;
206199 }
207200
208201 private void CredentialManager_CredentialsChanged ( object ? _ , CredentialModel model )
209202 {
210- SetPageByState ( _rpcController . GetState ( ) , model , _syncSessionController . GetState ( ) ) ;
211- }
212-
213- private void SyncSessionController_StateChanged ( object ? _ , SyncSessionControllerStateModel model )
214- {
215- SetPageByState ( _rpcController . GetState ( ) , _credentialManager . GetCachedCredentials ( ) , model ) ;
203+ SetPageByState ( _rpcController . GetState ( ) , model ) ;
216204 }
217205
218206 // Sadly this is necessary because Window.Content.SizeChanged doesn't
0 commit comments