mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-22 10:55:00 +00:00
refactor: use view locator instead of creating views manually in viewmodels (#1213)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
413669741d
commit
5fd074a9b6
60 changed files with 52 additions and 140 deletions
|
@ -7,8 +7,7 @@ namespace SourceGit.ViewModels
|
|||
public Models.Worktree Target
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
} = null;
|
||||
}
|
||||
|
||||
public bool Force
|
||||
{
|
||||
|
@ -20,7 +19,6 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
_repo = repo;
|
||||
Target = target;
|
||||
View = new Views.RemoveWorktree() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
|
@ -40,6 +38,6 @@ namespace SourceGit.ViewModels
|
|||
});
|
||||
}
|
||||
|
||||
private Repository _repo = null;
|
||||
private readonly Repository _repo = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue