diff --git a/SSAccessibility/SSSpeechSynthesizer.m b/SSAccessibility/SSSpeechSynthesizer.m index e800dd9..68322ad 100644 --- a/SSAccessibility/SSSpeechSynthesizer.m +++ b/SSAccessibility/SSSpeechSynthesizer.m @@ -84,6 +84,11 @@ - (void)enqueueLineForSpeaking:(NSString *)line { } dispatch_async(dispatch_get_main_queue(), ^{ + if (self.speakResetTimer) { + [self.speakResetTimer invalidate]; + _speakResetTimer = nil; + } + [self.speechQueue addObject:line]; [self _maybeDequeueLine]; }); @@ -155,6 +160,7 @@ - (void)voiceOverDidFinishAnnouncing:(NSNotification *)note { if (self.speakResetTimer) { [self.speakResetTimer invalidate]; + _speakResetTimer = nil; } NSDictionary *userInfo = [note userInfo];