mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
refactor: move auto-fetch from global preference to repository settings
This commit is contained in:
parent
8e31ea9140
commit
1ba294a07b
25 changed files with 166 additions and 227 deletions
|
@ -216,35 +216,6 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _gitDefaultCloneDir, value);
|
||||
}
|
||||
|
||||
public bool GitAutoFetch
|
||||
{
|
||||
get => Models.AutoFetchManager.Instance.IsEnabled;
|
||||
set
|
||||
{
|
||||
if (Models.AutoFetchManager.Instance.IsEnabled != value)
|
||||
{
|
||||
Models.AutoFetchManager.Instance.IsEnabled = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int? GitAutoFetchInterval
|
||||
{
|
||||
get => Models.AutoFetchManager.Instance.Interval;
|
||||
set
|
||||
{
|
||||
if (value is null || value < 1)
|
||||
return;
|
||||
|
||||
if (Models.AutoFetchManager.Instance.Interval != value)
|
||||
{
|
||||
Models.AutoFetchManager.Instance.Interval = (int)value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int ShellOrTerminal
|
||||
{
|
||||
get => _shellOrTerminal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue