mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
enhance: returns the instance of ViewModels.Preference
directly if it exists
This commit is contained in:
parent
bfb97dff72
commit
c8a13bc4e9
1 changed files with 7 additions and 6 deletions
|
@ -15,16 +15,17 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_instance == null)
|
if (_instance != null)
|
||||||
{
|
return _instance;
|
||||||
|
|
||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
_instance = Load();
|
_instance = Load();
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
}
|
|
||||||
|
|
||||||
_instance.PrepareGit();
|
_instance.PrepareGit();
|
||||||
_instance.PrepareShellOrTerminal();
|
_instance.PrepareShellOrTerminal();
|
||||||
_instance.PrepareWorkspaces();
|
_instance.PrepareWorkspaces();
|
||||||
|
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue