Skip to content

Commit

Permalink
fix(ios): missing reset of isStoppedByAction on stop
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Mar 31, 2023
1 parent 458571c commit fc328ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/RNWhisperContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit fc328ff

Please sign in to comment.