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,20 +133,13 @@ namespace SourceGit.Commands
var job = new Job var job = new Job
{ {
Cmd = new Fetch(repo, "--all", true, null) { RaiseError = false }, Cmd = new Fetch(repo, "--all", true, null) { RaiseError = false },
NextRunTimepoint = DateTime.Now.AddMinutes(Convert.ToDouble(Interval)), NextRunTimepoint = DateTime.Now,
}; };
lock (_lock) lock (_lock)
{
if (_jobs.ContainsKey(repo))
{ {
_jobs[repo] = job; _jobs[repo] = job;
} }
else
{
_jobs.Add(repo, job);
}
}
} }
public static void RemoveRepository(string repo) public static void RemoveRepository(string repo)