File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ public ListedItem SelectedItem
99
99
public BaseLayout ( )
100
100
{
101
101
this . Loaded += Page_Loaded ;
102
- App . AppSettings . LayoutModeChangeRequested += AppSettings_LayoutModeChangeRequested ;
103
102
Page_Loaded ( null , null ) ;
104
103
105
104
// QuickLook Integration
@@ -114,7 +113,7 @@ public BaseLayout()
114
113
115
114
private void AppSettings_LayoutModeChangeRequested ( object sender , EventArgs e )
116
115
{
117
- if ( App . CurrentInstance . ContentPage != null )
116
+ if ( App . CurrentInstance . ContentPage != null )
118
117
{
119
118
App . CurrentInstance . ViewModel . CancelLoadAndClearFiles ( ) ;
120
119
if ( App . AppSettings . LayoutMode == 0 )
@@ -140,6 +139,7 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
140
139
{
141
140
base . OnNavigatedTo ( eventArgs ) ;
142
141
// Add item jumping handler
142
+ App . AppSettings . LayoutModeChangeRequested += AppSettings_LayoutModeChangeRequested ;
143
143
Window . Current . CoreWindow . CharacterReceived += Page_CharacterReceived ;
144
144
var parameters = ( string ) eventArgs . Parameter ;
145
145
if ( App . AppSettings . FormFactor == Enums . FormFactorMode . Regular )
@@ -177,6 +177,7 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
177
177
{
178
178
App . CurrentInstance . ViewModel . _fileQueryResult . ContentsChanged -= App . CurrentInstance . ViewModel . FileContentsChanged ;
179
179
}
180
+ App . AppSettings . LayoutModeChangeRequested -= AppSettings_LayoutModeChangeRequested ;
180
181
}
181
182
182
183
private void UnloadMenuFlyoutItemByName ( string nameToUnload )
You can’t perform that action at this time.
0 commit comments