From fc328ff9f898d13d212cc166c4571f70ad0a6a32 Mon Sep 17 00:00:00 2001 From: Jhen Date: Fri, 31 Mar 2023 09:43:30 +0800 Subject: [PATCH] fix(ios): missing reset of isStoppedByAction on stop --- ios/RNWhisperContext.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/RNWhisperContext.mm b/ios/RNWhisperContext.mm index 2ef79ad..04eee41 100644 --- a/ios/RNWhisperContext.mm +++ b/ios/RNWhisperContext.mm @@ -53,6 +53,7 @@ - (void)prepareRealtime:(NSDictionary *)options { self->recordState.isRealtime = true; self->recordState.isTranscribing = false; self->recordState.isCapturing = false; + self->recordState.isStoppedByAction = false; self->recordState.mSelf = self; } @@ -284,6 +285,7 @@ - (void)stopTranscribe:(int)jobId { if (!self->recordState.isRealtime || !self->recordState.isCapturing) { return; } + self->recordState.isTranscribing = false; self->recordState.isCapturing = false; self->recordState.isStoppedByAction = true; [self stopAudio];