CS viewer: Fix read aloud broken after a configure with no changes

This commit is contained in:
Kovid Goyal 2024-11-26 14:37:53 +05:30
parent f82ea2036a
commit 0438ad7c94
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -190,6 +190,7 @@ class Client:
ut = self.current_utterance ut = self.current_utterance
self.current_utterance = None self.current_utterance = None
ut.onstart = ut.onpause = ut.onend = ut.onerror = ut.onresume = None ut.onstart = ut.onpause = ut.onend = ut.onerror = ut.onresume = None
ut.removeEventListener('boundary', self.utterance_boundary_reached)
window.speechSynthesis.cancel() window.speechSynthesis.cancel()
def resume_after_configure(self): def resume_after_configure(self):
@ -319,6 +320,5 @@ class Client:
self.save_settings() self.save_settings()
if is_speaking: if is_speaking:
self.resume_after_configure() self.resume_after_configure()
self.onevent('configured') self.onevent('configured')
) )