code_style: run dotnet format

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-12-08 21:51:33 +08:00
parent 723263d099
commit 962055dd2a
No known key found for this signature in database
4 changed files with 25 additions and 24 deletions

View file

@ -42,7 +42,7 @@ namespace SourceGit.ViewModels
return "-/-";
if (_current >= 0 && _current < Blocks.Count)
return $"{_current+1}/{Blocks.Count}";
return $"{_current + 1}/{Blocks.Count}";
return $"-/{Blocks.Count}";
}
@ -103,7 +103,8 @@ namespace SourceGit.ViewModels
public Block GotoNext()
{
if (Blocks.Count == 0) return null;
if (Blocks.Count == 0)
return null;
Current = (_current + 1) % Blocks.Count;
return Blocks[_current];
@ -111,7 +112,8 @@ namespace SourceGit.ViewModels
public Block GotoPrev()
{
if (Blocks.Count == 0) return null;
if (Blocks.Count == 0)
return null;
Current = _current == -1 ? Blocks.Count - 1 : (_current - 1 + Blocks.Count) % Blocks.Count;
return Blocks[_current];

View file

@ -132,7 +132,8 @@ namespace SourceGit.ViewModels
{
var files = new Commands.QueryRevisionFileNames(_repo.FullPath, sha).Result();
Dispatcher.UIThread.Invoke(() => {
Dispatcher.UIThread.Invoke(() =>
{
if (sha == Commit.SHA)
{
_revisionFiles.Clear();

View file

@ -1,5 +1,3 @@
using System;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;