refactor: delay starting background tasks

* start background task only it is needed
* solve the problem that we can not use `ViewModels.Preference.Instance` until resource ready
* remove avatar sever settings
This commit is contained in:
leo 2024-08-18 23:09:55 +08:00
parent e7921db339
commit 7fe1df20cc
No known key found for this signature in database
13 changed files with 178 additions and 190 deletions

View file

@ -528,6 +528,8 @@ namespace SourceGit
private void TryLaunchedAsNormal(IClassicDesktopStyleApplicationLifetime desktop)
{
Native.OS.SetupEnternalTools();
Models.AvatarManager.Instance.Start();
Models.AutoFetchManager.Instance.Start();
string startupRepo = null;
if (desktop.Args != null && desktop.Args.Length == 1 && Directory.Exists(desktop.Args[0]))