@@ -101,13 +101,24 @@ let iconThemeExtPoint = ExtensionsRegistry.registerExtensionPoint<IThemeExtensio
101101 }
102102} ) ;
103103
104- interface IInternalColorThemeData extends IColorTheme {
104+ class IInternalColorThemeData implements IColorTheme {
105+ id : string ;
106+ label : string ;
107+ description ?: string ;
108+ settings ?: IThemeSetting [ ] ;
109+ isLoaded : boolean ;
105110 path ?: string ;
106111 styleSheetContent ?: string ;
107112 extensionData : ExtensionData ;
108113}
109114
110- interface IInternalIconThemeData extends IFileIconTheme {
115+ class IInternalIconThemeData implements IFileIconTheme {
116+ id : string ;
117+ label : string ;
118+ description ?: string ;
119+ hasFileIcons ?: boolean ;
120+ hasFolderIcons ?: boolean ;
121+ isLoaded : boolean ;
111122 path ?: string ;
112123 styleSheetContent ?: string ;
113124 extensionData : ExtensionData ;
@@ -294,7 +305,6 @@ export class ThemeService implements IThemeService {
294305 $ ( this . container ) . addClass ( newThemeId ) ;
295306 }
296307 this . currentColorTheme = newTheme ;
297- newTheme . isLoaded = true ;
298308
299309 this . storageService . store ( COLOR_THEME_PREF , newThemeId , StorageScope . GLOBAL ) ;
300310 if ( broadcastToAllWindows ) {
@@ -462,7 +472,6 @@ export class ThemeService implements IThemeService {
462472 let onApply = ( newIconTheme : IInternalIconThemeData ) => {
463473 if ( newIconTheme ) {
464474 this . currentIconTheme = newIconTheme ;
465- newIconTheme . isLoaded = true ;
466475 } else {
467476 this . currentIconTheme = noFileIconTheme ;
468477 }
@@ -510,6 +519,7 @@ function _applyIconTheme(data: IInternalIconThemeData, onApply: (theme: IInterna
510519 data . styleSheetContent = result . content ;
511520 data . hasFileIcons = result . hasFileIcons ;
512521 data . hasFolderIcons = result . hasFolderIcons ;
522+ data . isLoaded = true ;
513523 _applyRules ( data . styleSheetContent , iconThemeRulesClassName ) ;
514524 return onApply ( data ) ;
515525 } , error => {
@@ -699,6 +709,7 @@ function applyTheme(theme: IInternalColorThemeData, onApply: (theme: IInternalCo
699709 theme . settings = themeSettings ;
700710 let styleSheetContent = _processThemeObject ( theme . id , themeSettings ) ;
701711 theme . styleSheetContent = styleSheetContent ;
712+ theme . isLoaded = true ;
702713 _applyRules ( styleSheetContent , colorThemeRulesClassName ) ;
703714 return onApply ( theme ) ;
704715 } , error => {
0 commit comments