Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 0cc03a2

Browse files
committed
Don't show Sync UI when there are no submodule changes
Hide the icon and counter as well as the Sync button.
1 parent f589bfa commit 0cc03a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/GitHub.VisualStudio/Views/GitHubPane/PullRequestDetailView.xaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@
184184
ToolTipService.ShowOnDisabled="True"
185185
VerticalAlignment="Center"/>
186186
<!-- Sync submodules -->
187-
<ui:OcticonImage Icon="package"/>
188-
<TextBlock Margin="4 0 0 0" Text="{Binding UpdateState.SubmodulesToSync}" VerticalAlignment="Center"/>
187+
<ui:OcticonImage Icon="package"
188+
Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ui:BooleanToVisibilityConverter}}" />
189+
<TextBlock Margin="4 0 0 0" Text="{Binding UpdateState.SubmodulesToSync}" VerticalAlignment="Center"
190+
Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ui:BooleanToVisibilityConverter}}" />
189191
<ui:GitHubActionLink Content="Sync"
190192
Command="{Binding SyncSubmodules}"
191193
Margin="4 0"

0 commit comments

Comments
 (0)