mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +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
|
@ -42,6 +42,26 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _httpProxy, value);
|
||||
}
|
||||
|
||||
public bool EnableAutoFetch
|
||||
{
|
||||
get => _repo.Settings.EnableAutoFetch;
|
||||
set => _repo.Settings.EnableAutoFetch = value;
|
||||
}
|
||||
|
||||
public int? AutoFetchInterval
|
||||
{
|
||||
get => _repo.Settings.AutoFetchInterval;
|
||||
set
|
||||
{
|
||||
if (value is null || value < 1)
|
||||
return;
|
||||
|
||||
var interval = (int)value;
|
||||
if (_repo.Settings.AutoFetchInterval != interval)
|
||||
_repo.Settings.AutoFetchInterval = interval;
|
||||
}
|
||||
}
|
||||
|
||||
public AvaloniaList<Models.CommitTemplate> CommitTemplates
|
||||
{
|
||||
get => _repo.Settings.CommitTemplates;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue