Skip to content

Commit

Permalink
Alternative fix committed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahamed-Ali authored and jfversluis committed Nov 1, 2024
1 parent e76059f commit a1e68e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Controls/src/Core/Shell/Shell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1860,9 +1860,9 @@ ShellAppearance GetAppearanceForPivot(Element pivot)
return null;
}

void NotifyFlyoutBehaviorObservers()
internal void NotifyFlyoutBehaviorObservers()
{
if (CurrentItem is null || CurrentItem.CurrentItem is not IShellSectionController)
if (CurrentItem == null || GetVisiblePage() == null)
return;

var behavior = (this as IFlyoutView).FlyoutBehavior;
Expand Down
10 changes: 7 additions & 3 deletions src/Controls/src/Core/Shell/ShellContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,14 @@ internal void EvaluateDisconnect()

// If the user has set the IsVisible property on this shell content to false
bool disconnect = true;

if(Parent is ShellSection shellSection &&

Shell shell = null;

if (Parent is ShellSection shellSection &&
shellSection.Parent is ShellItem shellItem &&
shellItem.Parent is Shell shell)
shellItem.Parent is Shell shellInstance)
{
shell = shellInstance;
disconnect =
!this.IsVisible || // user has set the IsVisible property to false
(_contentCache is not null && !_contentCache.IsVisible) || // user has set IsVisible on the Page to false
Expand All @@ -243,6 +246,7 @@ shellSection.Parent is ShellItem shellItem &&

if (!disconnect)
{
shell?.NotifyFlyoutBehaviorObservers();
return;
}

Expand Down

0 comments on commit a1e68e5

Please sign in to comment.