feat: Add config of auto fetch interval

This commit is contained in:
Gadfly 2024-05-11 17:37:54 +08:00
parent 62838e5b05
commit 7520a2a7b6
5 changed files with 66 additions and 7 deletions

View file

@ -232,6 +232,23 @@ namespace SourceGit.ViewModels
}
}
public int? GitAutoFetchInterval
{
get => Commands.AutoFetch.Interval;
set
{
if (value is null or < 1)
{
return;
}
if (Commands.AutoFetch.Interval != value)
{
Commands.AutoFetch.Interval = (int)value;
OnPropertyChanged(nameof(GitAutoFetchInterval));
}
}
}
public int ExternalMergeToolType
{
get => _externalMergeToolType;
@ -406,7 +423,8 @@ namespace SourceGit.ViewModels
});
container.Clear();
foreach (var one in list) container.Add(one);
foreach (var one in list)
container.Add(one);
}
public static Repository FindRepository(string path)