mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15: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
|
@ -25,7 +25,6 @@ namespace SourceGit.ViewModels
|
|||
_revision = branch.Head;
|
||||
_saveFile = $"archive-{Path.GetFileName(branch.Name)}.zip";
|
||||
BasedOn = branch;
|
||||
View = new Views.Archive() { DataContext = this };
|
||||
}
|
||||
|
||||
public Archive(Repository repo, Models.Commit commit)
|
||||
|
@ -34,7 +33,6 @@ namespace SourceGit.ViewModels
|
|||
_revision = commit.SHA;
|
||||
_saveFile = $"archive-{commit.SHA.Substring(0, 10)}.zip";
|
||||
BasedOn = commit;
|
||||
View = new Views.Archive() { DataContext = this };
|
||||
}
|
||||
|
||||
public Archive(Repository repo, Models.Tag tag)
|
||||
|
@ -43,7 +41,6 @@ namespace SourceGit.ViewModels
|
|||
_revision = tag.SHA;
|
||||
_saveFile = $"archive-{Path.GetFileName(tag.Name)}.zip";
|
||||
BasedOn = tag;
|
||||
View = new Views.Archive() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue