@@ -254,9 +254,6 @@ public SidebarViewModel()
254254 HideSectionCommand = new RelayCommand ( HideSection ) ;
255255 UnpinItemCommand = new RelayCommand ( UnpinItem ) ;
256256 PinItemCommand = new RelayCommand ( PinItem ) ;
257- OpenInNewTabCommand = new AsyncRelayCommand ( OpenInNewTabAsync ) ;
258- OpenInNewWindowCommand = new AsyncRelayCommand ( OpenInNewWindowAsync ) ;
259- OpenInNewPaneCommand = new AsyncRelayCommand ( OpenInNewPaneAsync ) ;
260257 EjectDeviceCommand = new RelayCommand ( EjectDevice ) ;
261258 OpenPropertiesCommand = new RelayCommand < CommandBarFlyout > ( OpenProperties ) ;
262259 ReorderItemsCommand = new AsyncRelayCommand ( ReorderItemsAsync ) ;
@@ -830,41 +827,12 @@ public async void HandleItemInvokedAsync(object item, PointerUpdateKind pointerU
830827
831828 private ICommand UnpinItemCommand { get ; }
832829
833- private ICommand OpenInNewTabCommand { get ; }
834-
835- private ICommand OpenInNewWindowCommand { get ; }
836-
837- private ICommand OpenInNewPaneCommand { get ; }
838-
839830 private ICommand EjectDeviceCommand { get ; }
840831
841832 private ICommand OpenPropertiesCommand { get ; }
842833
843834 private ICommand ReorderItemsCommand { get ; }
844835
845- private async Task OpenInNewPaneAsync ( )
846- {
847- if ( await DriveHelpers . CheckEmptyDrive ( rightClickedItem . Path ) )
848- return ;
849- PaneHolder . OpenSecondaryPane ( rightClickedItem . Path ) ;
850- }
851-
852- private async Task OpenInNewTabAsync ( )
853- {
854- if ( await DriveHelpers . CheckEmptyDrive ( rightClickedItem . Path ) )
855- return ;
856-
857- await NavigationHelpers . OpenPathInNewTab ( rightClickedItem . Path , false ) ;
858- }
859-
860- private async Task OpenInNewWindowAsync ( )
861- {
862- if ( await DriveHelpers . CheckEmptyDrive ( rightClickedItem . Path ) )
863- return ;
864-
865- await NavigationHelpers . OpenPathInNewWindowAsync ( rightClickedItem . Path ) ;
866- }
867-
868836 private void PinItem ( )
869837 {
870838 if ( rightClickedItem is DriveItem )
@@ -971,14 +939,14 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
971939 {
972940 new ContextMenuFlyoutItemViewModel ( )
973941 {
974- Text = "SideBarCreateNewLibrary/Text" . GetLocalizedResource ( ) ,
942+ Text = Strings . SideBarCreateNewLibrary_Text . GetLocalizedResource ( ) ,
975943 Glyph = "\uE710 " ,
976944 Command = CreateLibraryCommand ,
977945 ShowItem = options . IsLibrariesHeader
978946 } ,
979947 new ContextMenuFlyoutItemViewModel ( )
980948 {
981- Text = "SideBarRestoreLibraries/Text" . GetLocalizedResource ( ) ,
949+ Text = Strings . SideBarRestoreLibraries_Text . GetLocalizedResource ( ) ,
982950 Glyph = "\uE10E " ,
983951 Command = RestoreLibrariesCommand ,
984952 ShowItem = options . IsLibrariesHeader
@@ -991,9 +959,18 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
991959 {
992960 IsVisible = options . ShowEmptyRecycleBin ,
993961 } . Build ( ) ,
994- new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewTabFromSidebarAction ) . Build ( ) ,
995- new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewWindowFromSidebarAction ) . Build ( ) ,
996- new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewPaneFromSidebarAction ) . Build ( ) ,
962+ new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewTabFromSidebarAction )
963+ {
964+ IsVisible = UserSettingsService . GeneralSettingsService . ShowOpenInNewTab
965+ } . Build ( ) ,
966+ new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewWindowFromSidebarAction )
967+ {
968+ IsVisible = UserSettingsService . GeneralSettingsService . ShowOpenInNewWindow
969+ } . Build ( ) ,
970+ new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewPaneFromSidebarAction )
971+ {
972+ IsVisible = UserSettingsService . GeneralSettingsService . ShowOpenInNewPane
973+ } . Build ( ) ,
997974 new ContextMenuFlyoutItemViewModel ( )
998975 {
999976 Text = "PinFolderToSidebar" . GetLocalizedResource ( ) ,
0 commit comments