@@ -22,6 +22,7 @@ public sealed class AddressToolbarViewModel : ObservableObject, IAddressToolbarV
2222
2323 private IUserSettingsService UserSettingsService { get ; } = Ioc . Default . GetRequiredService < IUserSettingsService > ( ) ;
2424 private IAppearanceSettingsService AppearanceSettingsService { get ; } = Ioc . Default . GetRequiredService < IAppearanceSettingsService > ( ) ;
25+ private IGeneralSettingsService GeneralSettingsService { get ; } = Ioc . Default . GetRequiredService < IGeneralSettingsService > ( ) ;
2526
2627 private readonly IDialogService _dialogService = Ioc . Default . GetRequiredService < IDialogService > ( ) ;
2728
@@ -162,6 +163,23 @@ public string? PathText
162163 public bool ShowHomeButton
163164 => AppearanceSettingsService . ShowHomeButton ;
164165
166+ public bool ShowShelfPaneToggleButton
167+ => AppearanceSettingsService . ShowShelfPaneToggleButton && AppLifecycleHelper . AppEnvironment is AppEnvironment . Dev ;
168+
169+
170+ // TODO replace with action when feature is marked as stable
171+ public bool ShowShelfPane
172+ {
173+ get => GeneralSettingsService . ShowShelfPane ;
174+ set
175+ {
176+ if ( value == GeneralSettingsService . ShowShelfPane )
177+ return ;
178+
179+ GeneralSettingsService . ShowShelfPane = value ;
180+ }
181+ }
182+
165183 public ObservableCollection < NavigationBarSuggestionItem > NavigationBarSuggestions = [ ] ;
166184
167185 private CurrentInstanceViewModel instanceViewModel ;
@@ -213,6 +231,19 @@ public AddressToolbarViewModel()
213231 case nameof ( AppearanceSettingsService . ShowHomeButton ) :
214232 OnPropertyChanged ( nameof ( ShowHomeButton ) ) ;
215233 break ;
234+ case nameof ( AppearanceSettingsService . ShowShelfPaneToggleButton ) :
235+ OnPropertyChanged ( nameof ( ShowShelfPaneToggleButton ) ) ;
236+ break ;
237+ }
238+ } ;
239+
240+ GeneralSettingsService . PropertyChanged += ( s , e ) =>
241+ {
242+ switch ( e . PropertyName )
243+ {
244+ case nameof ( GeneralSettingsService . ShowShelfPane ) :
245+ OnPropertyChanged ( nameof ( ShowShelfPane ) ) ;
246+ break ;
216247 }
217248 } ;
218249 }
0 commit comments