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
|
@ -40,9 +40,7 @@ namespace SourceGit.ViewModels
|
|||
public Discard(Repository repo)
|
||||
{
|
||||
_repo = repo;
|
||||
|
||||
Mode = new DiscardAllMode();
|
||||
View = new Views.Discard { DataContext = this };
|
||||
}
|
||||
|
||||
public Discard(Repository repo, List<Models.Change> changes)
|
||||
|
@ -56,8 +54,6 @@ namespace SourceGit.ViewModels
|
|||
Mode = new DiscardSingleFile() { Path = _changes[0].Path };
|
||||
else
|
||||
Mode = new DiscardMultipleFiles() { Count = _changes.Count };
|
||||
|
||||
View = new Views.Discard() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue