mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-05-01 06:15:41 +08:00
enhance: returns the instance of ViewModels.Preference directly if it exists
This commit is contained in:
@@ -15,16 +15,17 @@ namespace SourceGit.ViewModels
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_instance == null)
|
if (_instance != null)
|
||||||
{
|
return _instance;
|
||||||
_isLoading = true;
|
|
||||||
_instance = Load();
|
_isLoading = true;
|
||||||
_isLoading = false;
|
_instance = Load();
|
||||||
}
|
_isLoading = false;
|
||||||
|
|
||||||
_instance.PrepareGit();
|
_instance.PrepareGit();
|
||||||
_instance.PrepareShellOrTerminal();
|
_instance.PrepareShellOrTerminal();
|
||||||
_instance.PrepareWorkspaces();
|
_instance.PrepareWorkspaces();
|
||||||
|
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user