@@ -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,10 @@ 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 . HasAnyItemInProgress ) ||
86+ ( AppearanceSettingsService . StatusCenterVisibility == StatusCenterVisibility . DuringFileOperationsUntilDismissed && OngoingTasksViewModel . HasAnyItem ) ;
8287
8388 public bool ShowShelfPaneToggleButton => AppearanceSettingsService . ShowShelfPaneToggleButton && AppLifecycleHelper . AppEnvironment is AppEnvironment . Dev ;
8489
@@ -369,6 +374,9 @@ public NavigationToolbarViewModel()
369374 case nameof ( AppearanceSettingsService . ShowHomeButton ) :
370375 OnPropertyChanged ( nameof ( ShowHomeButton ) ) ;
371376 break ;
377+ case nameof ( AppearanceSettingsService . StatusCenterVisibility ) :
378+ OnPropertyChanged ( nameof ( ShowStatusCenterButton ) ) ;
379+ break ;
372380 case nameof ( AppearanceSettingsService . ShowShelfPaneToggleButton ) :
373381 OnPropertyChanged ( nameof ( ShowShelfPaneToggleButton ) ) ;
374382 break ;
@@ -383,6 +391,16 @@ public NavigationToolbarViewModel()
383391 break ;
384392 }
385393 } ;
394+ OngoingTasksViewModel . PropertyChanged += ( s , e ) =>
395+ {
396+ switch ( e . PropertyName )
397+ {
398+ case nameof ( OngoingTasksViewModel . HasAnyItem ) :
399+ case nameof ( OngoingTasksViewModel . HasAnyItemInProgress ) :
400+ OnPropertyChanged ( nameof ( ShowStatusCenterButton ) ) ;
401+ break ;
402+ }
403+ } ;
386404 }
387405
388406 // Methods
0 commit comments