mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
refactor: add a popup panel to show submodule updating status
This commit is contained in:
parent
069c78f213
commit
d0edc09b2e
8 changed files with 71 additions and 9 deletions
|
@ -306,16 +306,10 @@ namespace SourceGit.Views
|
|||
e.Handled = true;
|
||||
}
|
||||
|
||||
private async void UpdateSubmodules(object sender, RoutedEventArgs e)
|
||||
private void UpdateSubmodules(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.Repository repo)
|
||||
{
|
||||
repo.SetWatcherEnabled(false);
|
||||
iconSubmoduleUpdate.Classes.Add("rotating");
|
||||
await Task.Run(() => new Commands.Submodule(repo.FullPath).Update());
|
||||
iconSubmoduleUpdate.Classes.Remove("rotating");
|
||||
repo.SetWatcherEnabled(true);
|
||||
}
|
||||
repo.UpdateSubmodules();
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue