mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
code_style: add ViewModels.Repository.GetCustomAction(scope)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
5c279b4b56
commit
cf8cff6b64
2 changed files with 22 additions and 37 deletions
|
@ -694,17 +694,7 @@ namespace SourceGit.ViewModels
|
|||
menu.Items.Add(archive);
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
|
||||
var actions = new List<Models.CustomAction>();
|
||||
foreach (var action in Preferences.Instance.CustomActions)
|
||||
{
|
||||
if (action.Scope == Models.CustomActionScope.Commit)
|
||||
actions.Add(action);
|
||||
}
|
||||
foreach (var action in _repo.Settings.CustomActions)
|
||||
{
|
||||
if (action.Scope == Models.CustomActionScope.Commit)
|
||||
actions.Add(action);
|
||||
}
|
||||
var actions = _repo.GetCustomActions(Models.CustomActionScope.Commit);
|
||||
if (actions.Count > 0)
|
||||
{
|
||||
var custom = new MenuItem();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue