mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
Android: Close voice typing session when closing the editor (#11466)
This commit is contained in:
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
Block a user