diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index 5a3b9d52..9731da6f 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -395,12 +395,17 @@ Classes="icon_button" Width="14" Margin="8,0" - Click="UpdateSubmodules" + Command="{Binding UpdateSubmodules}" IsVisible="{Binding Submodules, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}" ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Update}"> - diff --git a/src/Views/Repository.axaml.cs b/src/Views/Repository.axaml.cs index 1eadb7ac..2cca3ab3 100644 --- a/src/Views/Repository.axaml.cs +++ b/src/Views/Repository.axaml.cs @@ -1,6 +1,4 @@ -using System; using System.Collections.Generic; -using System.Threading.Tasks; using Avalonia; using Avalonia.Controls; @@ -305,14 +303,6 @@ namespace SourceGit.Views e.Handled = true; } - - private void UpdateSubmodules(object sender, RoutedEventArgs e) - { - if (DataContext is ViewModels.Repository repo) - repo.UpdateSubmodules(); - - e.Handled = true; - } private void CollectBranchesFromNode(List outs, ViewModels.BranchTreeNode node) {