1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Linux - cleanup initialization

This commit is contained in:
Diogo Trindade 2023-05-06 15:39:47 +01:00
parent 97b858b332
commit becc6e0715

View File

@ -22,18 +22,20 @@ public class App : Application
Program.CreateLogger(_container); Program.CreateLogger(_container);
RxApp.MainThreadScheduler = AvaloniaScheduler.Instance; RxApp.MainThreadScheduler = AvaloniaScheduler.Instance;
AvaloniaXamlLoader.Load(this); AvaloniaXamlLoader.Load(this);
RegisterProviders();
} }
public override void OnFrameworkInitializationCompleted() public override void OnFrameworkInitializationCompleted()
{ {
if (Design.IsDesignMode) if (Design.IsDesignMode)
return; return;
if (ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
return;
ArtemisBootstrapper.Initialize(); ArtemisBootstrapper.Initialize();
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
_applicationStateManager = new ApplicationStateManager(_container!, desktop.Args); _applicationStateManager = new ApplicationStateManager(_container!, desktop.Args);
RegisterProviders();
} }
private void RegisterProviders() private void RegisterProviders()