mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
feature: remember the Include Untracked Files
toggle state in local changes
This commit is contained in:
parent
5ec8279d38
commit
31ad317a57
2 changed files with 13 additions and 4 deletions
|
@ -14,6 +14,12 @@ namespace SourceGit.Models
|
|||
set;
|
||||
} = string.Empty;
|
||||
|
||||
public bool IncludeUntrackedInLocalChanges
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = true;
|
||||
|
||||
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
||||
{
|
||||
get;
|
||||
|
|
|
@ -206,13 +206,17 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public bool IncludeUntracked
|
||||
{
|
||||
get => _includeUntracked;
|
||||
get => _settings.IncludeUntrackedInLocalChanges;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _includeUntracked, value))
|
||||
if (value != _settings.IncludeUntrackedInLocalChanges)
|
||||
{
|
||||
_settings.IncludeUntrackedInLocalChanges = value;
|
||||
OnPropertyChanged();
|
||||
Task.Run(RefreshWorkingCopyChanges);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSearching
|
||||
{
|
||||
|
@ -918,7 +922,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public void RefreshWorkingCopyChanges()
|
||||
{
|
||||
var changes = new Commands.QueryLocalChanges(_fullpath, _includeUntracked).Result();
|
||||
var changes = new Commands.QueryLocalChanges(_fullpath, _settings.IncludeUntrackedInLocalChanges).Result();
|
||||
if (_workingCopy == null)
|
||||
return;
|
||||
|
||||
|
@ -2299,7 +2303,6 @@ namespace SourceGit.ViewModels
|
|||
private List<Models.Submodule> _submodules = new List<Models.Submodule>();
|
||||
private List<Models.Submodule> _visibleSubmodules = new List<Models.Submodule>();
|
||||
|
||||
private bool _includeUntracked = true;
|
||||
private Models.Commit _searchResultSelectedCommit = null;
|
||||
private Timer _autoFetchTimer = null;
|
||||
private DateTime _lastFetchTime = DateTime.MinValue;
|
||||
|
|
Loading…
Reference in a new issue