mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
code_style: remove Rider warnings
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
daba8e5064
commit
8de37720fa
2 changed files with 3 additions and 6 deletions
|
@ -153,12 +153,9 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
else if (commits.Count == 1)
|
||||
{
|
||||
var commit = commits[0] as Models.Commit;
|
||||
|
||||
var commit = (commits[0] as Models.Commit)!;
|
||||
if (_repo.SearchResultSelectedCommit == null || _repo.SearchResultSelectedCommit.SHA != commit.SHA)
|
||||
{
|
||||
_repo.SearchResultSelectedCommit = _repo.SearchedCommits.Find(x => x.SHA == commit.SHA);
|
||||
}
|
||||
|
||||
AutoSelectedCommit = commit;
|
||||
NavigationId = _navigationId + 1;
|
||||
|
@ -224,7 +221,7 @@ namespace SourceGit.ViewModels
|
|||
public ContextMenu MakeContextMenu(ListBox list)
|
||||
{
|
||||
var current = _repo.CurrentBranch;
|
||||
if (current == null)
|
||||
if (current == null || list.SelectedItems == null)
|
||||
return null;
|
||||
|
||||
if (list.SelectedItems.Count > 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue