@@ -118,7 +118,7 @@ public MainWindow()
118118
119119 _ = AutoUpdater . UpdateCheckLoop ( this , UpdatesBanner ) ;
120120
121- if ( ! Settings . Get ( "TransferredOldSettings" ) )
121+ if ( ! Settings . Get ( "TransferredOldSettings" ) || ! Settings . Get ( "TransferredOldSettings-2" ) )
122122 TransferOldSettingsFormats ( ) ;
123123
124124 Activated += ( _ , e ) =>
@@ -178,38 +178,53 @@ private void ClearSubtitle()
178178
179179 private static void TransferOldSettingsFormats ( )
180180 {
181- foreach ( IPackageManager Manager in PEInterface . Managers )
181+ if ( ! Settings . Get ( "TransferredOldSettings" ) )
182182 {
183- string SettingName = "Disable" + Manager . Name ;
184- if ( Settings . Get ( SettingName ) )
183+ foreach ( IPackageManager Manager in PEInterface . Managers )
185184 {
186- Settings . SetDictionaryItem ( "DisabledManagers" , Manager . Name , true ) ;
187- Settings . Set ( SettingName , false ) ;
185+ string SettingName = "Disable" + Manager . Name ;
186+ if ( Settings . Get ( SettingName ) )
187+ {
188+ Settings . SetDictionaryItem ( "DisabledManagers" , Manager . Name , true ) ;
189+ Settings . Set ( SettingName , false ) ;
190+ }
188191 }
189- }
190192
191- // Dependency checks don't need to be transferred, because the worst case scenario is the user has to click the "don't show again" again
193+ // Dependency checks don't need to be transferred, because the worst case scenario is the user has to click the "don't show again" again
192194
193- foreach ( string Page in new [ ] { "Discover" , "Installed" , "Bundles" , "Updates" } )
194- {
195- if ( Settings . Get ( $ "HideToggleFilters{ Page } Page") )
195+ foreach ( string Page in new [ ] { "Discover" , "Installed" , "Bundles" , "Updates" } )
196196 {
197- Settings . SetDictionaryItem ( "HideToggleFilters" , Page , true ) ;
198- Settings . Set ( $ "HideToggleFilters{ Page } Page", false ) ;
197+ if ( Settings . Get ( $ "HideToggleFilters{ Page } Page") )
198+ {
199+ Settings . SetDictionaryItem ( "HideToggleFilters" , Page , true ) ;
200+ Settings . Set ( $ "HideToggleFilters{ Page } Page", false ) ;
201+ }
202+
203+ if ( Settings . Get ( $ "DisableInstantSearch{ Page } Tab") )
204+ {
205+ Settings . SetDictionaryItem ( "DisableInstantSearch" , Page , true ) ;
206+ Settings . Set ( $ "DisableInstantSearch{ Page } Tab", false ) ;
207+ }
208+
209+ if ( ! int . TryParse ( Settings . GetValue ( $ "SidepanelWidth{ Page } Page") , out int sidepanelWidth ) ) sidepanelWidth = 250 ;
210+ Settings . SetDictionaryItem ( "SidepanelWidths" , Page , sidepanelWidth ) ;
211+ Settings . Set ( $ "SidepanelWidth{ Page } Page", false ) ;
199212 }
200213
201- if ( Settings . Get ( $ "DisableInstantSearch{ Page } Tab") )
214+ Settings . Set ( "TransferredOldSettings" , true ) ;
215+ }
216+
217+ foreach ( IPackageManager Manager in PEInterface . Managers )
218+ {
219+ string SettingName = "AlwaysElevate" + Manager . Name ;
220+ if ( Settings . Get ( SettingName ) )
202221 {
203- Settings . SetDictionaryItem ( "DisableInstantSearch " , Page , true ) ;
204- Settings . Set ( $ "DisableInstantSearch { Page } Tab" , false ) ;
222+ Settings . SetDictionaryItem ( "AlwaysElevate " , Manager . Name , true ) ;
223+ Settings . Set ( SettingName , false ) ;
205224 }
206-
207- if ( ! int . TryParse ( Settings . GetValue ( $ "SidepanelWidth{ Page } Page") , out int sidepanelWidth ) ) sidepanelWidth = 250 ;
208- Settings . SetDictionaryItem ( "SidepanelWidths" , Page , sidepanelWidth ) ;
209- Settings . Set ( $ "SidepanelWidth{ Page } Page", false ) ;
210225 }
211226
212- Settings . Set ( "TransferredOldSettings" , true ) ;
227+ Settings . Set ( "TransferredOldSettings-2 " , true ) ;
213228 }
214229
215230 public void HandleNotificationActivation ( AppNotificationActivatedEventArgs args )
0 commit comments