Skip to content

Commit 712f97e

Browse files
Merge pull request #45 from vgromfeld/hideFlyoutOnClick
Hide sign out flyout on click
2 parents 6666ff3 + 6c89168 commit 712f97e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ public async Task LoginAsync()
185185
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
186186
public async Task LogoutAsync()
187187
{
188+
// Close Menu
189+
if (FlyoutBase.GetAttachedFlyout(_loginButton) is FlyoutBase flyout)
190+
{
191+
flyout.Hide();
192+
}
193+
188194
if (IsLoading)
189195
{
190196
return;
@@ -217,12 +223,6 @@ public async Task LogoutAsync()
217223

218224
LogoutCompleted?.Invoke(this, new EventArgs());
219225
}
220-
221-
// Close Menu
222-
if (FlyoutBase.GetAttachedFlyout(_loginButton) is FlyoutBase flyout)
223-
{
224-
flyout.Hide();
225-
}
226226
}
227227
}
228228
}

0 commit comments

Comments
 (0)