Skip to content
Snippets Groups Projects
Unverified Commit 42016bfb authored by hiroshisuga's avatar hiroshisuga Committed by GitHub
Browse files

Stop dictation when swapping languages

parent 4ec9b019
No related branches found
No related tags found
No related merge requests found
......@@ -104,8 +104,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