mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feat: show git file mode change if exist
This commit is contained in:
parent
2d5e048797
commit
a249eed1ac
7 changed files with 61 additions and 2 deletions
|
@ -7,6 +7,7 @@ using Avalonia.Media.Imaging;
|
|||
using Avalonia.Threading;
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using SourceGit.Models;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
|
@ -66,6 +67,12 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _syncScrollOffset, value);
|
||||
}
|
||||
|
||||
public Models.FileModeDiff FileModeDiff
|
||||
{
|
||||
get => _fileModeDiff;
|
||||
set => SetProperty(ref _fileModeDiff, value);
|
||||
}
|
||||
|
||||
public DiffContext(string repo, Models.DiffOption option, DiffContext previous = null)
|
||||
{
|
||||
_repo = repo;
|
||||
|
@ -86,6 +93,11 @@ namespace SourceGit.ViewModels
|
|||
var latest = new Commands.Diff(repo, option).Result();
|
||||
var rs = null as object;
|
||||
|
||||
if (latest.FileModeDiff != null)
|
||||
{
|
||||
FileModeDiff = latest.FileModeDiff;
|
||||
}
|
||||
|
||||
if (latest.TextDiff != null)
|
||||
{
|
||||
latest.TextDiff.File = _option.Path;
|
||||
|
@ -180,5 +192,6 @@ namespace SourceGit.ViewModels
|
|||
private bool _isTextDiff = false;
|
||||
private object _content = null;
|
||||
private Vector _syncScrollOffset = Vector.Zero;
|
||||
private Models.FileModeDiff _fileModeDiff = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue