mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
CS viewer: Fix read aloud broken after a configure with no changes
This commit is contained in:
parent
f82ea2036a
commit
0438ad7c94
@ -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')
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user