mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-23 03:14:59 +00:00
enhance: cleanup unused resources
Some checks are pending
Some checks are pending
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
b78f6b0ea8
commit
aff003fd6d
8 changed files with 51 additions and 26 deletions
|
@ -44,10 +44,10 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public object Switcher
|
||||
public IDisposable Switcher
|
||||
{
|
||||
get => _switcher;
|
||||
set => SetProperty(ref _switcher, value);
|
||||
private set => SetProperty(ref _switcher, value);
|
||||
}
|
||||
|
||||
public Launcher(string startupRepo)
|
||||
|
@ -148,12 +148,13 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public void CancelSwitcher()
|
||||
{
|
||||
Switcher?.Dispose();
|
||||
Switcher = null;
|
||||
}
|
||||
|
||||
public void SwitchWorkspace(Workspace to)
|
||||
{
|
||||
if (to.IsActive)
|
||||
if (to == null || to.IsActive)
|
||||
return;
|
||||
|
||||
foreach (var one in Pages)
|
||||
|
@ -623,6 +624,6 @@ namespace SourceGit.ViewModels
|
|||
private LauncherPage _activePage = null;
|
||||
private bool _ignoreIndexChange = false;
|
||||
private string _title = string.Empty;
|
||||
private object _switcher = null;
|
||||
private IDisposable _switcher = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue