mirror of https://github.com/laurent22/joplin.git
Android: Close voice typing session when closing the editor (#11466)
parent
021cdf8034
commit
df577bc08c
|
@ -78,6 +78,10 @@ const useWhisper = ({ locale, provider, onSetPreview, onText }: UseVoiceTypingPr
|
|||
setMustDownloadModel(!(await builder.isDownloaded()));
|
||||
}, [builder]);
|
||||
|
||||
useEffect(() => () => {
|
||||
void voiceTypingRef.current?.stop();
|
||||
}, []);
|
||||
|
||||
return [error, mustDownloadModel, voiceTyping];
|
||||
};
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class Whisper implements VoiceTypingSession {
|
|||
|
||||
public async stop() {
|
||||
if (this.sessionId === null) {
|
||||
logger.warn('Session already closed.');
|
||||
logger.debug('Session already closed.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue