Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Files/Strings/es-ES/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,7 @@
<data name="SettingsPageHeader.Text" xml:space="preserve">
<value>Ajustes</value>
</data>
<data name="StatusBarControlInvertSelection.Text" xml:space="preserve">
<value>Invertir Selección</value>
</data>
</root>
32 changes: 25 additions & 7 deletions Files/Views/Pages/ModernShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
viewModel = new ItemViewModel();
interactionOperation = new Interaction();

string NavigationPath = ""; // path to navigate

switch (NavParams)
{
case "Start":
Expand All @@ -99,34 +101,38 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
SidebarControl.SelectedSidebarItem = App.sideBarItems[0];
break;
case "Desktop":
ItemDisplayFrame.Navigate(typeof(GenericFileBrowser), App.AppSettings.DesktopPath, new SuppressNavigationTransitionInfo());
NavigationPath = App.AppSettings.DesktopPath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.DesktopPath, StringComparison.OrdinalIgnoreCase));
break;
case "Downloads":
ItemDisplayFrame.Navigate(typeof(GenericFileBrowser), App.AppSettings.DownloadsPath, new SuppressNavigationTransitionInfo());
NavigationPath = App.AppSettings.DownloadsPath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.DownloadsPath, StringComparison.OrdinalIgnoreCase));
break;
case "Documents":
ItemDisplayFrame.Navigate(typeof(GenericFileBrowser), App.AppSettings.DocumentsPath, new SuppressNavigationTransitionInfo());
NavigationPath = App.AppSettings.DocumentsPath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.DocumentsPath, StringComparison.OrdinalIgnoreCase));
break;
case "Pictures":
ItemDisplayFrame.Navigate(typeof(PhotoAlbum), App.AppSettings.PicturesPath, new SuppressNavigationTransitionInfo());
NavigationPath = App.AppSettings.PicturesPath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.PicturesPath, StringComparison.OrdinalIgnoreCase));
break;
case "Music":
ItemDisplayFrame.Navigate(typeof(GenericFileBrowser), App.AppSettings.MusicPath, new SuppressNavigationTransitionInfo());
NavigationPath = App.AppSettings.MusicPath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.MusicPath, StringComparison.OrdinalIgnoreCase));
break;
case "Videos":
ItemDisplayFrame.Navigate(typeof(GenericFileBrowser), App.AppSettings.VideosPath, new SuppressNavigationTransitionInfo());
NavigationPath = App.AppSettings.VideosPath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.VideosPath, StringComparison.OrdinalIgnoreCase));
break;
case "OneDrive":
NavigationPath = App.AppSettings.OneDrivePath;
SidebarControl.SelectedSidebarItem = App.sideBarItems.First(x => x.Path.Equals(App.AppSettings.OneDrivePath, StringComparison.OrdinalIgnoreCase));
break;

default:
if (NavParams[0] >= 'A' && NavParams[0] <= 'Z' && NavParams[1] == ':')
{
ItemDisplayFrame.Navigate(typeof(GenericFileBrowser), NavParams, new SuppressNavigationTransitionInfo());
NavigationPath = NavParams;
SidebarControl.SelectedSidebarItem = App.AppSettings.DrivesManager.Drives.First(x => x.Tag.ToString().Equals($"{NavParams[0]}:\\", StringComparison.OrdinalIgnoreCase));
}
else
Expand All @@ -136,6 +142,18 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
break;
}

if (NavigationPath != "" )
{
if (App.AppSettings.LayoutMode == 0) // List View
{
App.CurrentInstance.ContentFrame.Navigate(typeof(GenericFileBrowser), NavigationPath, new SuppressNavigationTransitionInfo());
}
else
{
App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath, new SuppressNavigationTransitionInfo());
}
}

this.Loaded -= Page_Loaded;
}

Expand Down