mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-08 04: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
|
@ -9,7 +9,6 @@ namespace SourceGit.ViewModels
|
|||
public Models.Commit Head
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
[Required(ErrorMessage = "Commit message is required!!!")]
|
||||
|
@ -24,9 +23,7 @@ namespace SourceGit.ViewModels
|
|||
_repo = repo;
|
||||
_oldMessage = new Commands.QueryCommitFullMessage(_repo.FullPath, head.SHA).Result();
|
||||
_message = _oldMessage;
|
||||
|
||||
Head = head;
|
||||
View = new Views.Reword() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
|
@ -50,7 +47,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
private readonly Repository _repo;
|
||||
private readonly string _oldMessage;
|
||||
private string _message;
|
||||
private string _oldMessage;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue