Skip to content
Snippets Groups Projects
Unverified Commit 3e497e2d authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #12794 from hiroshisuga/patch-40

Stop dictation when swapping languages with the voice recognition on
parents e67fd186 42016bfb
No related branches found
No related tags found
No related merge requests found
......@@ -106,8 +106,13 @@ class Pad extends PureComponent {
} = this.props;
if (this.recognition) {
if (ownerId !== currentUserId) {
this.recognition.stop();
} else if (this.state.listening && this.recognition.lang !== locale) {
this.recognition.stop();
this.stopListen();
}
this.recognition.lang = locale;
if (ownerId !== currentUserId) this.recognition.stop();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment