E-book viewer: Fix spurious chapter transition after configuring Read aloud

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

View File

@ -254,7 +254,7 @@ class TTSManager(QObject):
elif prev_state is QTextToSpeech.State.Ready:
self.emit_state_event('begin')
elif state is QTextToSpeech.State.Ready:
if prev_state in (QTextToSpeech.State.Paused, QTextToSpeech.State.Speaking):
if prev_state == QTextToSpeech.State.Speaking:
if not self.speaking_simple_text:
if self.tracker.pop_first() and (text := self.tracker.current_text()):
self.tts.say(text)