chore(#5499): drop redundant post-divider _applyVoiceModePref call
The success branch had two adjacent calls: if(typeof window._applyVoiceModePref==='function') window._applyVoiceModePref(); // pre-divider (the actual fix) _applyComposerFooterVisibilitySettings(); if(typeof window._applyVoiceModePref==='function') window._applyVoiceModePref(); // post-divider (redundant) The post-divider one ran after _applyComposerFooterVisibilitySettings, so it couldn't affect the divider the PR was meant to fix. It looked like a defensive double-tap, but the function is idempotent and the pref source (localStorage) doesn't change between the two synchronous calls — so it was just dead code that made the diff look bigger than the actual semantic change. Drop it. Net PR footprint is now strictly: 'use the window-qualified name and apply once before divider recompute in both IIFE branches.' Re-tested: 26/26 pass on test_issue4598_composer_control_visibility + test_issue1488_composer_voice_buttons.
This commit is contained in:
1 parent
edce177202
commit
aa201b1550
1 file changed
-1
@@ -2998,7 +2998,6 @@ window._mirrorSpeechSettingsFromServer=_mirrorSpeechSettingsFromServer;
|
||||
// closure-local to the voice-mode IIFE and not visible here.
|
||||
if(typeof window._applyVoiceModePref==='function') window._applyVoiceModePref();
|
||||
_applyComposerFooterVisibilitySettings();
|
||||
if(typeof window._applyVoiceModePref==='function') window._applyVoiceModePref();
|
||||
// TTS: apply enabled state on boot so buttons show/hide correctly (#499)
|
||||
if(typeof _applyTtsEnabled==='function') _applyTtsEnabled(localStorage.getItem('hermes-tts-enabled')==='true');
|
||||
}catch(e){
|
||||
|
||||
Reference in new issue
Block a user