Skip to content

Optimized home page identifying #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2020
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
1 change: 1 addition & 0 deletions Files/BaseLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs eventArgs)
{
App.CurrentInstance.NavigationToolbar.CanNavigateToParent = true;
}
App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page

await App.CurrentInstance.ViewModel.RefreshItems();

Expand Down
2 changes: 0 additions & 2 deletions Files/UserControls/ModernSidebar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ private void Sidebar_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sende
App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath, new SuppressNavigationTransitionInfo());
}

App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page

App.CurrentInstance.NavigationToolbar.PathControlDisplayText = App.CurrentInstance.ViewModel.WorkingDirectory;
}

Expand Down
3 changes: 1 addition & 2 deletions Files/UserControls/YourHome.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private void OpenFileLocation_Click(object sender, RoutedEventArgs e)
protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
{
base.OnNavigatedTo(eventArgs);
App.InteractionViewModel.IsPageTypeNotHome = false;
var parameters = eventArgs.Parameter.ToString();
Locations.ItemLoader.itemsAdded.Clear();
Locations.ItemLoader.DisplayItems();
Expand Down Expand Up @@ -127,8 +128,6 @@ private void Button_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEven
App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath); // Grid View
break;
}

App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page
}

public static StorageFile RecentsFile;
Expand Down
6 changes: 0 additions & 6 deletions Files/Views/Pages/ModernShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
{
if (ItemDisplayFrame.CurrentSourcePageType == typeof(GenericFileBrowser))
{
App.InteractionViewModel.IsPageTypeNotHome = true;
// Reset DataGrid Rows that may be in "cut" command mode
IEnumerable items = (ItemDisplayFrame.Content as GenericFileBrowser).AllView.ItemsSource;
if (items == null)
Expand All @@ -182,7 +181,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
}
else if (App.CurrentInstance.CurrentPageType == typeof(PhotoAlbum))
{
App.InteractionViewModel.IsPageTypeNotHome = true;
// Reset Photo Grid items that may be in "cut" command mode
foreach (ListedItem listedItem in (ItemDisplayFrame.Content as PhotoAlbum).FileList.Items)
{
Expand All @@ -195,10 +193,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
imageOfItem.Opacity = 1;
}
}
else if (App.CurrentInstance.CurrentPageType == typeof(YourHome))
{
App.InteractionViewModel.IsPageTypeNotHome = false;
}
}

public void UpdateProgressFlyout(InteractionOperationType operationType, int amountComplete, int amountTotal)
Expand Down