sourcegit/src/ViewModels/LFSPull.cs

28 lines
731 B
C#
Raw Normal View History

2024-06-17 03:25:57 -07:00
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class LFSPull : Popup
{
public LFSPull(Repository repo)
{
_repo = repo;
View = new Views.LFSPull() { DataContext = this };
}
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = $"Pull LFS objects from remote ...";
return Task.Run(() =>
{
new Commands.LFS(_repo.FullPath).Pull(SetProgressDescription);
CallUIThread(() => _repo.SetWatcherEnabled(true));
return true;
});
}
private readonly Repository _repo = null;
}
}