File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
arduino-ide-extension/src/browser Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export class Settings extends SketchContribution {
3232 await this . settingsService . update ( settings ) ;
3333 await this . settingsService . save ( ) ;
3434 } else {
35- await this . settingsService . reset ( true ) ;
35+ await this . settingsService . resetFromDialog ( ) ;
3636 }
3737 } ,
3838 isEnabled : ( ) => ! this . settingsOpened ,
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ export class SettingsDialog extends AbstractDialog<Promise<Settings>> {
114114
115115 // calling settingsService.reset() in order to reload the settings from the preferenceService
116116 // and update the UI including changes triggered from the command palette
117- this . settingsService . reset ( false ) ;
117+ this . settingsService . reset ( ) ;
118118
119119 this . widget . activate ( ) ;
120120 }
Original file line number Diff line number Diff line change @@ -208,14 +208,18 @@ export class SettingsService {
208208 }
209209 }
210210
211- async reset ( resetFromDialog : boolean ) : Promise < void > {
212- const prevThemeId = this . _settings . prevThemeId ;
211+ async reset ( ) : Promise < void > {
213212 const settings = await this . loadSettings ( ) ;
214213 await this . update ( settings , false ) ;
215214 this . onDidResetEmitter . fire ( this . _settings ) ;
216- if ( resetFromDialog && prevThemeId ) {
215+ }
216+
217+ async resetFromDialog ( ) : Promise < void > {
218+ const prevThemeId = this . _settings . prevThemeId ;
219+ if ( prevThemeId ) {
217220 ThemeService . get ( ) . setCurrentTheme ( prevThemeId ) ;
218221 }
222+ this . reset ( ) ;
219223 }
220224
221225 async validate (
You can’t perform that action at this time.
0 commit comments