@@ -1043,16 +1043,10 @@ define(function (require, exports, module) {
10431043 }
10441044
10451045 /**
1046- * Check if any deprecated extensions are installed and show a dialog once
1046+ * Check if any deprecated extensions are installed and show a dialog once per extension
10471047 * @private
10481048 */
10491049 function _checkAndShowDeprecatedExtensionsDialog ( ) {
1050- // Check if we've already shown the dialog
1051- const dialogShown = PreferencesManager . stateManager . get ( STATE_DEPRECATED_EXTENSIONS_DIALOG_SHOWN ) ;
1052- if ( dialogShown ) {
1053- return ;
1054- }
1055-
10561050 // Get deprecated extensions config
10571051 const deprecatedExtensionsConfig = DefaultExtensions . deprecatedExtensions ;
10581052 if ( ! deprecatedExtensionsConfig || ! deprecatedExtensionsConfig . extensionIDsAndDocs ) {
@@ -1061,20 +1055,25 @@ define(function (require, exports, module) {
10611055
10621056 const deprecatedExtensionIDs = deprecatedExtensionsConfig . extensionIDsAndDocs ;
10631057
1064- // Check which deprecated extensions are loaded
1058+ // Get the state object that tracks which deprecated extensions we've already shown
1059+ let shownDeprecatedExtensions = PreferencesManager . stateManager . get ( STATE_DEPRECATED_EXTENSIONS_DIALOG_SHOWN ) ;
1060+ if ( ! shownDeprecatedExtensions || typeof shownDeprecatedExtensions !== 'object' ) {
1061+ shownDeprecatedExtensions = { } ;
1062+ }
1063+
1064+ // Check which deprecated extensions are loaded and not yet shown
10651065 const deprecatedExtensionsFound = [ ] ;
10661066 for ( const extensionID of loadedExtensionIDs ) {
1067- if ( deprecatedExtensionIDs [ extensionID ] ) {
1067+ if ( deprecatedExtensionIDs [ extensionID ] && ! shownDeprecatedExtensions [ extensionID ] ) {
10681068 deprecatedExtensionsFound . push ( {
10691069 id : extensionID ,
10701070 docUrl : deprecatedExtensionIDs [ extensionID ]
10711071 } ) ;
10721072 }
10731073 }
10741074
1075- // If no deprecated extensions found, mark dialog as shown and return
1075+ // If no new deprecated extensions found, return
10761076 if ( deprecatedExtensionsFound . length === 0 ) {
1077- PreferencesManager . stateManager . set ( STATE_DEPRECATED_EXTENSIONS_DIALOG_SHOWN , true ) ;
10781077 return ;
10791078 }
10801079
@@ -1087,8 +1086,11 @@ define(function (require, exports, module) {
10871086 const $template = $ ( Mustache . render ( DeprecatedExtensionsTemplate , templateVars ) ) ;
10881087 Dialogs . showModalDialogUsingTemplate ( $template ) ;
10891088
1090- // Mark dialog as shown
1091- PreferencesManager . stateManager . set ( STATE_DEPRECATED_EXTENSIONS_DIALOG_SHOWN , true ) ;
1089+ // Mark each extension as shown
1090+ for ( const ext of deprecatedExtensionsFound ) {
1091+ shownDeprecatedExtensions [ ext . id ] = true ;
1092+ }
1093+ PreferencesManager . stateManager . set ( STATE_DEPRECATED_EXTENSIONS_DIALOG_SHOWN , shownDeprecatedExtensions ) ;
10921094 }
10931095
10941096
0 commit comments