mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Initialize public api instance in constructor so that we can use App.API all the time
This commit is contained in:
parent
bb257747f2
commit
23a1e5bc58
1 changed files with 3 additions and 2 deletions
|
|
@ -54,6 +54,9 @@ namespace Flow.Launcher
|
|||
.AddSingleton<MainViewModel>()
|
||||
).Build();
|
||||
Ioc.Default.ConfigureServices(host.Services);
|
||||
|
||||
// Initialize the public API first
|
||||
API = Ioc.Default.GetRequiredService<IPublicAPI>();
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
|
|
@ -73,8 +76,6 @@ namespace Flow.Launcher
|
|||
{
|
||||
await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
|
||||
{
|
||||
API = Ioc.Default.GetRequiredService<IPublicAPI>();
|
||||
|
||||
Ioc.Default.GetRequiredService<Updater>().Initialize(Launcher.Properties.Settings.Default.GithubRepo);
|
||||
|
||||
Ioc.Default.GetRequiredService<Portable>().PreStartCleanUpAfterPortabilityUpdate();
|
||||
|
|
|
|||
Loading…
Reference in a new issue