Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes
  • Loading branch information
kubaflo committed Jul 16, 2024
commit 203df93fcee4bf28a2200813935cf7efdd1d65cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public ShellToolbarTracker(IShellContext shellContext, AToolbar toolbar, DrawerL
((IShellController)ShellContext.Shell).AddFlyoutBehaviorObserver(this);
ShellContext.Shell.Toolbar.PropertyChanged += OnToolbarPropertyChanged;
ShellContext.Shell.Navigated += OnShellNavigated;
ShellContext.Shell.PropertyChanged += HandleShellPropertyChanged;
}

void IShellToolbarTracker.SetToolbar(IToolbar toolbar)
Expand Down Expand Up @@ -182,6 +183,7 @@ protected override void Dispose(bool disposing)
((IShellController)ShellContext.Shell)?.RemoveFlyoutBehaviorObserver(this);
ShellContext.Shell.Toolbar.PropertyChanged -= OnToolbarPropertyChanged;
ShellContext.Shell.Navigated -= OnShellNavigated;
ShellContext.Shell.PropertyChanged -= HandleShellPropertyChanged;
UpdateTitleView(ShellContext.AndroidContext, _platformToolbar, null);

if (_searchView != null)
Expand Down Expand Up @@ -280,6 +282,12 @@ void OnShellNavigated(object sender, ShellNavigatedEventArgs e)
}
}

void HandleShellPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.Is(Shell.FlyoutIconProperty))
UpdateLeftBarButtonItem();
}

BackButtonBehavior _backButtonBehavior = null;
protected virtual void OnPagePropertyChanged(object sender, PropertyChangedEventArgs e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ protected virtual void HandleShellPropertyChanged(object sender, PropertyChanged
{
if (e.Is(VisualElement.FlowDirectionProperty))
UpdateFlowDirection();
else if (e.Is(Shell.FlyoutIconProperty))
UpdateLeftToolbarItems();
}

protected virtual void OnBackButtonBehaviorPropertyChanged(object sender, PropertyChangedEventArgs e)
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue20166.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public Issue20166()
void Button1_Clicked(System.Object sender, System.EventArgs e)
{
CurrentItem = shellTab2;
Shell.FlyoutIcon = String.Empty;
}

}
Expand Down