File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -407,16 +407,23 @@ public static void Forward_Click(object sender, RoutedEventArgs e)
407407 }
408408 else
409409 {
410- GenericFileBrowser . P . path = ( History . ForwardList [ History . ForwardList . Count ( ) - 1 ] ) ;
411- foreach ( Microsoft . UI . Xaml . Controls . NavigationViewItemBase NavItemChoice in MainPage . nv . MenuItems )
410+ Debug . WriteLine ( "Debug: " + ( "Removable Drive (" + History . ForwardList [ History . ForwardList . Count ( ) - 1 ] . Split ( ' \\ ' ) [ 0 ] + " \\ )" ) ) ;
411+ if ( ! History . ForwardList [ History . ForwardList . Count ( ) - 1 ] . Split ( ' \\ ' ) [ 0 ] . Contains ( "C: \\ " ) )
412412 {
413- if ( NavItemChoice is Microsoft . UI . Xaml . Controls . NavigationViewItem && NavItemChoice . Name . ToString ( ) == "LocD_IC" )
413+
414+ foreach ( Microsoft . UI . Xaml . Controls . NavigationViewItemBase NavItemChoice in MainPage . nv . MenuItems )
414415 {
415- MainPage . Select . itemSelected = NavItemChoice ;
416- break ;
416+ if ( NavItemChoice is Microsoft . UI . Xaml . Controls . NavigationViewItem && NavItemChoice . Content . ToString ( ) == ( "Removable Drive (" + History . ForwardList [ History . ForwardList . Count ( ) - 1 ] . Split ( '\\ ' ) [ 0 ] + "\\ )" ) )
417+ {
418+
419+ MainPage . Select . itemSelected = NavItemChoice ;
420+ break ;
421+ }
417422 }
418423 }
424+ GenericFileBrowser . P . path = ( History . ForwardList [ History . ForwardList . Count ( ) - 1 ] ) ;
419425 ItemViewModel . ViewModel = new ItemViewModel ( History . ForwardList [ History . ForwardList . Count ( ) - 1 ] , GenericFileBrowser . GFBPageName ) ; // To take into account the correct index without interference from the folder being navigated to
426+
420427 }
421428
422429
@@ -482,7 +489,6 @@ public static void Refresh_Click(object sender, RoutedEventArgs e)
482489
483490 }
484491
485- //GenericFileBrowser.P.path = ItemViewModel.PUIP.Path;
486492 }
487493 }
488494
You can’t perform that action at this time.
0 commit comments