You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-10 00:05:42 +02:00
Android: Close voice typing session when closing the editor (#11466)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user