@@ -228,7 +228,7 @@ public AutoDuty()
228228 AssemblyDirectoryInfo = AssemblyFileInfo . Directory ;
229229
230230 Version =
231- ( ( PluginInterface . IsDev ? new Version ( 0 , 0 , 0 , 214 ) :
231+ ( ( PluginInterface . IsDev ? new Version ( 0 , 0 , 0 , 215 ) :
232232 PluginInterface . IsTesting ? PluginInterface . Manifest . TestingAssemblyVersion ?? PluginInterface . Manifest . AssemblyVersion : PluginInterface . Manifest . AssemblyVersion ) ! ) . Revision ;
233233
234234 if ( ! _configDirectory . Exists )
@@ -261,12 +261,9 @@ public AutoDuty()
261261 WindowSystem . AddWindow ( MainWindow ) ;
262262 WindowSystem . AddWindow ( Overlay ) ;
263263
264- if ( Configuration . ShowOverlay && ( ! Configuration . HideOverlayWhenStopped || States . HasFlag ( PluginState . Looping ) || States . HasFlag ( PluginState . Navigating ) ) )
265- SchedulerHelper . ScheduleAction ( "ShowOverlay" , ( ) => Overlay . IsOpen = true , ( ) => PlayerHelper . IsReady ) ;
266-
267- if ( Configuration . ShowMainWindowOnStartup )
268- SchedulerHelper . ScheduleAction ( "ShowMainWindowOnStartup" , ( ) => OpenMainUI ( ) , ( ) => PlayerHelper . IsReady ) ;
269-
264+ if ( Svc . ClientState . IsLoggedIn )
265+ this . ClientStateOnLogin ( ) ;
266+
270267 Svc . Commands . AddHandler ( "/ad" , new CommandInfo ( OnCommand ) { } ) ;
271268 Svc . Commands . AddHandler ( CommandName , new CommandInfo ( OnCommand )
272269 {
@@ -317,9 +314,20 @@ public AutoDuty()
317314 }
318315 }
319316
320- private static void ClientStateOnLogin ( ) =>
317+ private void ClientStateOnLogin ( )
318+ {
321319 ConfigurationMain . Instance . SetProfileToDefault ( ) ;
322320
321+ Svc . Framework . RunOnTick ( ( ) =>
322+ {
323+ if ( Configuration . ShowOverlay && ( ! Configuration . HideOverlayWhenStopped || States . HasFlag ( PluginState . Looping ) || States . HasFlag ( PluginState . Navigating ) ) )
324+ SchedulerHelper . ScheduleAction ( "ShowOverlay" , ( ) => Overlay . IsOpen = true , ( ) => PlayerHelper . IsReady ) ;
325+
326+ if ( Configuration . ShowMainWindowOnStartup )
327+ SchedulerHelper . ScheduleAction ( "ShowMainWindowOnStartup" , ( ) => OpenMainUI ( ) , ( ) => PlayerHelper . IsReady ) ;
328+ } ) ;
329+ }
330+
323331 private void UiBuilderOnDraw ( )
324332 {
325333 if ( PlayerHelper . IsValid )
0 commit comments