code_review: PR #703

* change the name of this feature to `Enable Block-Navigation`
* change the icon of the toggle button used to enable this feature
* use a new class `BlockNavigation` to hold all the data about this feature
* create `BlockNavigation` data only when it is enabled

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-12-08 21:02:30 +08:00
parent 0c04cccd52
commit 15d3ad355d
No known key found for this signature in database
14 changed files with 277 additions and 323 deletions

View file

@ -206,10 +206,10 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _useFullTextDiff, value);
}
public bool EnableChangeBlocks
public bool UseBlockNavigationInDiffView
{
get => _enableChangeBlocks;
set => SetProperty(ref _enableChangeBlocks, value);
get => _useBlockNavigationInDiffView;
set => SetProperty(ref _useBlockNavigationInDiffView, value);
}
public Models.ChangeViewMode UnstagedChangeViewMode
@ -620,7 +620,7 @@ namespace SourceGit.ViewModels
private bool _enableDiffViewWordWrap = false;
private bool _showHiddenSymbolsInDiffView = false;
private bool _useFullTextDiff = false;
private bool _enableChangeBlocks = false;
private bool _useBlockNavigationInDiffView = false;
private Models.ChangeViewMode _unstagedChangeViewMode = Models.ChangeViewMode.List;
private Models.ChangeViewMode _stagedChangeViewMode = Models.ChangeViewMode.List;