mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-26 03:40:45 +08:00
code_review: PR #1412
- Use `ViewModels.StashesPage.SelectedStash` instead of `sender is not ListBox { SelectedValue: Models.Stash stash }`
- In tags view, `SelectedItem` can be `Models.Tag` or `ViewModels.TagTreeNode`
- In logs window, `vm.SelectedLog` may be null
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -1365,12 +1365,6 @@ namespace SourceGit.ViewModels
|
||||
ShowPopup(new DeleteBranch(this, branch));
|
||||
}
|
||||
|
||||
public void DeleteRemote(Models.Remote remote)
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
ShowPopup(new DeleteRemote(this, remote));
|
||||
}
|
||||
|
||||
public void DeleteMultipleBranches(List<Models.Branch> branches, bool isLocal)
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
@@ -1407,6 +1401,12 @@ namespace SourceGit.ViewModels
|
||||
ShowPopup(new AddRemote(this));
|
||||
}
|
||||
|
||||
public void DeleteRemote(Models.Remote remote)
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
ShowPopup(new DeleteRemote(this, remote));
|
||||
}
|
||||
|
||||
public void AddSubmodule()
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
|
||||
@@ -295,6 +295,12 @@ namespace SourceGit.ViewModels
|
||||
SearchFilter = string.Empty;
|
||||
}
|
||||
|
||||
public void Drop(Models.Stash stash)
|
||||
{
|
||||
if (stash != null && _repo.CanCreatePopup())
|
||||
_repo.ShowPopup(new DropStash(_repo, stash));
|
||||
}
|
||||
|
||||
private void RefreshVisible()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_searchFilter))
|
||||
@@ -314,12 +320,6 @@ namespace SourceGit.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public void Drop(Models.Stash stash)
|
||||
{
|
||||
if (_repo.CanCreatePopup())
|
||||
_repo.ShowPopup(new DropStash(_repo, stash));
|
||||
}
|
||||
|
||||
private Repository _repo = null;
|
||||
private List<Models.Stash> _stashes = [];
|
||||
private List<Models.Stash> _visibleStashes = [];
|
||||
|
||||
Reference in New Issue
Block a user