mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -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;
|
set;
|
||||||
} = string.Empty;
|
} = string.Empty;
|
||||||
|
|
||||||
|
public bool IncludeUntrackedInLocalChanges
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = true;
|
||||||
|
|
||||||
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
@ -206,13 +206,17 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public bool IncludeUntracked
|
public bool IncludeUntracked
|
||||||
{
|
{
|
||||||
get => _includeUntracked;
|
get => _settings.IncludeUntrackedInLocalChanges;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (SetProperty(ref _includeUntracked, value))
|
if (value != _settings.IncludeUntrackedInLocalChanges)
|
||||||
|
{
|
||||||
|
_settings.IncludeUntrackedInLocalChanges = value;
|
||||||
|
OnPropertyChanged();
|
||||||
Task.Run(RefreshWorkingCopyChanges);
|
Task.Run(RefreshWorkingCopyChanges);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsSearching
|
public bool IsSearching
|
||||||
{
|
{
|
||||||
|
@ -918,7 +922,7 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public void RefreshWorkingCopyChanges()
|
public void RefreshWorkingCopyChanges()
|
||||||
{
|
{
|
||||||
var changes = new Commands.QueryLocalChanges(_fullpath, _includeUntracked).Result();
|
var changes = new Commands.QueryLocalChanges(_fullpath, _settings.IncludeUntrackedInLocalChanges).Result();
|
||||||
if (_workingCopy == null)
|
if (_workingCopy == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2299,7 +2303,6 @@ namespace SourceGit.ViewModels
|
||||||
private List<Models.Submodule> _submodules = new List<Models.Submodule>();
|
private List<Models.Submodule> _submodules = new List<Models.Submodule>();
|
||||||
private List<Models.Submodule> _visibleSubmodules = new List<Models.Submodule>();
|
private List<Models.Submodule> _visibleSubmodules = new List<Models.Submodule>();
|
||||||
|
|
||||||
private bool _includeUntracked = true;
|
|
||||||
private Models.Commit _searchResultSelectedCommit = null;
|
private Models.Commit _searchResultSelectedCommit = null;
|
||||||
private Timer _autoFetchTimer = null;
|
private Timer _autoFetchTimer = null;
|
||||||
private DateTime _lastFetchTime = DateTime.MinValue;
|
private DateTime _lastFetchTime = DateTime.MinValue;
|
||||||
|
|
Loading…
Reference in a new issue