mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
code_style: use ?:
operator instead of if...else
This commit is contained in:
parent
4af8cc18d2
commit
15456f0dee
1 changed files with 1 additions and 9 deletions
|
@ -134,15 +134,7 @@ namespace SourceGit.ViewModels
|
|||
var activeIdx = Pages.IndexOf(_activePage);
|
||||
if (removeIdx == activeIdx)
|
||||
{
|
||||
if (removeIdx == Pages.Count - 1)
|
||||
{
|
||||
ActivePage = Pages[removeIdx - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
ActivePage = Pages[removeIdx + 1];
|
||||
}
|
||||
|
||||
ActivePage = Pages[removeIdx == Pages.Count - 1 ? removeIdx - 1 : removeIdx + 1];
|
||||
CloseRepositoryInTab(page);
|
||||
Pages.RemoveAt(removeIdx);
|
||||
OnPropertyChanged(nameof(Pages));
|
||||
|
|
Loading…
Reference in a new issue