Client preferences should user new user preference API

Follow up to Ic40da2af8ea46bd42cbebbdbceda2431bd8600ae

Bug: T341278
Change-Id: Iaaf75d9c91d594d826b556fc7d04965a3a3bd3a9
This commit is contained in:
Jon Robson 2024-06-18 12:24:39 -08:00
parent 0f594e0af7
commit 92307893fa

View file

@ -12,6 +12,7 @@ const languageButton = require( './languageButton.js' ),
watchstar = require( './watchstar.js' ).init,
setupIntersectionObservers = require( './setupIntersectionObservers.js' ),
menuTabs = require( './menuTabs.js' ),
userPreferences = require( './userPreferences.js' ),
legacyMessageBoxStyles = require( './legacyMessageBoxStyles.js' ),
{ isNightModeGadgetEnabled, disableNightModeForGadget, alterExclusionMessage } = require( './disableNightModeIfGadget.js' ),
teleportTarget = /** @type {HTMLElement} */require( /** @type {string} */ ( 'mediawiki.page.ready' ) ).teleportTarget;
@ -93,10 +94,10 @@ function main( window ) {
// disable our night mode if so
if ( isNightModeGadgetEnabled() ) {
disableNightModeForGadget();
clientPreferences.render( appearanceMenuSelector, clientPreferenceConfig );
clientPreferences.render( appearanceMenuSelector, clientPreferenceConfig, userPreferences );
alterExclusionMessage();
} else {
clientPreferences.render( appearanceMenuSelector, clientPreferenceConfig );
clientPreferences.render( appearanceMenuSelector, clientPreferenceConfig, userPreferences );
}
} );
}