@@ -168,7 +168,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
168168 {
169169 if ( ItemDisplayFrame . CurrentSourcePageType == typeof ( GenericFileBrowser ) )
170170 {
171- App . InteractionViewModel . IsPageTypeNotHome = true ;
172171 // Reset DataGrid Rows that may be in "cut" command mode
173172 IEnumerable items = ( ItemDisplayFrame . Content as GenericFileBrowser ) . AllView . ItemsSource ;
174173 if ( items == null )
@@ -182,7 +181,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
182181 }
183182 else if ( App . CurrentInstance . CurrentPageType == typeof ( PhotoAlbum ) )
184183 {
185- App . InteractionViewModel . IsPageTypeNotHome = true ;
186184 // Reset Photo Grid items that may be in "cut" command mode
187185 foreach ( ListedItem listedItem in ( ItemDisplayFrame . Content as PhotoAlbum ) . FileList . Items )
188186 {
@@ -195,10 +193,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
195193 imageOfItem . Opacity = 1 ;
196194 }
197195 }
198- else if ( App . CurrentInstance . CurrentPageType == typeof ( YourHome ) )
199- {
200- App . InteractionViewModel . IsPageTypeNotHome = false ;
201- }
202196 }
203197
204198 public void UpdateProgressFlyout ( InteractionOperationType operationType , int amountComplete , int amountTotal )
@@ -231,7 +225,8 @@ private async void ModernShellPage_KeyUp(object sender, KeyRoutedEventArgs e)
231225 var ctrl = Window . Current . CoreWindow . GetKeyState ( VirtualKey . Control ) . HasFlag ( CoreVirtualKeyStates . Down ) ;
232226 var alt = Window . Current . CoreWindow . GetKeyState ( VirtualKey . Menu ) . HasFlag ( CoreVirtualKeyStates . Down ) ;
233227 var shift = Window . Current . CoreWindow . GetKeyState ( VirtualKey . Shift ) . HasFlag ( CoreVirtualKeyStates . Down ) ;
234- var tabInstance = App . CurrentInstance != null ;
228+ var tabInstance = App . CurrentInstance . CurrentPageType == typeof ( GenericFileBrowser )
229+ || App . CurrentInstance . CurrentPageType == typeof ( PhotoAlbum ) ;
235230
236231 switch ( c : ctrl , s : shift , a : alt , t : tabInstance , k : e . Key )
237232 {
@@ -265,15 +260,15 @@ private async void ModernShellPage_KeyUp(object sender, KeyRoutedEventArgs e)
265260 App . CurrentInstance . InteractionOperations . SelectAllItems ( ) ;
266261 break ;
267262
268- case ( true , false , false , true , VirtualKey . N ) : //ctrl + n, new window
263+ case ( true , false , false , false , VirtualKey . N ) : //ctrl + n, new window
269264 App . CurrentInstance . InteractionOperations . LaunchNewWindow ( ) ;
270265 break ;
271266
272- case ( true , false , false , true , VirtualKey . W ) : //ctrl + w, close tab
267+ case ( true , false , false , false , VirtualKey . W ) : //ctrl + w, close tab
273268 App . CurrentInstance . InteractionOperations . CloseTab ( ) ;
274269 break ;
275270
276- case ( true , false , false , true , VirtualKey . F4 ) : //ctrl + F4, close tab
271+ case ( true , false , false , false , VirtualKey . F4 ) : //ctrl + F4, close tab
277272 App . CurrentInstance . InteractionOperations . CloseTab ( ) ;
278273 break ;
279274
0 commit comments