mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
27 lines
739 B
C#
27 lines
739 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace SourceGit.ViewModels
|
|
{
|
|
public class LFSFetch : Popup
|
|
{
|
|
public LFSFetch(Repository repo)
|
|
{
|
|
_repo = repo;
|
|
View = new Views.LFSFetch() { DataContext = this };
|
|
}
|
|
|
|
public override Task<bool> Sure()
|
|
{
|
|
_repo.SetWatcherEnabled(false);
|
|
ProgressDescription = $"Fetching LFS objects from remote ...";
|
|
return Task.Run(() =>
|
|
{
|
|
new Commands.LFS(_repo.FullPath).Fetch(SetProgressDescription);
|
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
|
return true;
|
|
});
|
|
}
|
|
|
|
private readonly Repository _repo = null;
|
|
}
|
|
}
|