fix: Auto fetch repo immediately when it's opened

This commit is contained in:
Gadfly 2024-06-21 16:39:18 +08:00
parent d3d6889e25
commit 98df13211a
No known key found for this signature in database

View file

@ -133,19 +133,12 @@ namespace SourceGit.Commands
var job = new Job
{
Cmd = new Fetch(repo, "--all", true, null) { RaiseError = false },
NextRunTimepoint = DateTime.Now.AddMinutes(Convert.ToDouble(Interval)),
NextRunTimepoint = DateTime.Now,
};
lock (_lock)
{
if (_jobs.ContainsKey(repo))
{
_jobs[repo] = job;
}
else
{
_jobs.Add(repo, job);
}
_jobs[repo] = job;
}
}