@@ -36,6 +36,7 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
3636 private readonly IUpdateService UpdateService = Ioc . Default . GetRequiredService < IUpdateService > ( ) ;
3737 private readonly ICommandManager Commands = Ioc . Default . GetRequiredService < ICommandManager > ( ) ;
3838 private readonly IContentPageContext ContentPageContext = Ioc . Default . GetRequiredService < IContentPageContext > ( ) ;
39+ private readonly StatusCenterViewModel OngoingTasksViewModel = Ioc . Default . GetRequiredService < StatusCenterViewModel > ( ) ;
3940
4041 // Fields
4142
@@ -79,6 +80,9 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
7980
8081 public bool ShowHomeButton => AppearanceSettingsService . ShowHomeButton ;
8182 public bool EnableOmnibar => GeneralSettingsService . EnableOmnibar ;
83+ public bool ShowStatusCenterButton =>
84+ AppearanceSettingsService . StatusCenterVisibility == StatusCenterVisibility . Always ||
85+ ( AppearanceSettingsService . StatusCenterVisibility == StatusCenterVisibility . DuringOngoingFileOperations && OngoingTasksViewModel . HasAnyItem ) ;
8286
8387 public bool ShowShelfPaneToggleButton => AppearanceSettingsService . ShowShelfPaneToggleButton && AppLifecycleHelper . AppEnvironment is AppEnvironment . Dev ;
8488
@@ -369,6 +373,9 @@ public NavigationToolbarViewModel()
369373 case nameof ( AppearanceSettingsService . ShowHomeButton ) :
370374 OnPropertyChanged ( nameof ( ShowHomeButton ) ) ;
371375 break ;
376+ case nameof ( AppearanceSettingsService . StatusCenterVisibility ) :
377+ OnPropertyChanged ( nameof ( ShowStatusCenterButton ) ) ;
378+ break ;
372379 case nameof ( AppearanceSettingsService . ShowShelfPaneToggleButton ) :
373380 OnPropertyChanged ( nameof ( ShowShelfPaneToggleButton ) ) ;
374381 break ;
@@ -383,6 +390,15 @@ public NavigationToolbarViewModel()
383390 break ;
384391 }
385392 } ;
393+ OngoingTasksViewModel . PropertyChanged += ( s , e ) =>
394+ {
395+ switch ( e . PropertyName )
396+ {
397+ case nameof ( OngoingTasksViewModel . HasAnyItem ) :
398+ OnPropertyChanged ( nameof ( ShowStatusCenterButton ) ) ;
399+ break ;
400+ }
401+ } ;
386402 }
387403
388404 // Methods
0 commit comments