Skip to content

Commit 35d7202

Browse files
committed
Close flyout
1 parent 720acaa commit 35d7202

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Files.App/UserControls/StatusBarControl.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
BorderThickness="0"
6262
Content="{x:Bind DirectoryPropertiesViewModel.GitBranchDisplayName, Mode=OneWay}">
6363
<Button.Flyout>
64-
<Flyout Opening="Flyout_Opening">
64+
<Flyout x:Name="GitBranchesFlyout" Opening="Flyout_Opening">
6565
<Grid
6666
Width="300"
6767
Height="340"
@@ -98,9 +98,11 @@
9898

9999
<!-- Branches List -->
100100
<ListView
101+
x:Name="BranchesListView"
101102
Grid.Row="1"
102103
Padding="4"
103104
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
105+
ItemClick="BranchesListView_ItemClick"
104106
ItemsSource="{x:Bind DirectoryPropertiesViewModel.BranchesNames, Mode=OneWay}"
105107
SelectedIndex="{x:Bind DirectoryPropertiesViewModel.SelectedBranchIndex, Mode=TwoWay}"
106108
SelectionMode="Single" />

src/Files.App/UserControls/StatusBarControl.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,10 @@ private void Flyout_Opening(object sender, object e)
4848
{
4949
DirectoryPropertiesViewModel.SelectedBranchIndex = DirectoryPropertiesViewModel.ActiveBranchIndex;
5050
}
51+
52+
private void BranchesListView_ItemClick(object sender, ItemClickEventArgs e)
53+
{
54+
GitBranchesFlyout.Hide();
55+
}
5156
}
5257
}

0 commit comments

Comments
 (0)