From f724bf764dca262130b268d49a6bbcd111dc0a0a Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 6 May 2026 03:43:29 +0200 Subject: [PATCH] Remove redundant audio recording lifecycle hooks in App.jsx --- src/App.jsx | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index f3fd9a6..3a994f4 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1072,46 +1072,6 @@ async function regenerateFromIndex(index, overrideUserText = null) { setIsChatDragActive(false) }, [canAttachImages, activeSidebarMode]) - useEffect(() => { - if (audioInputEnabled || !isRecordingAudio) { - return - } - stopAudioRecording({ shouldTranscribe: false }) - }, [audioInputEnabled, isRecordingAudio]) - - useEffect(() => { - if (audioInputRuntimeReady || !isRecordingAudio) { - return - } - stopAudioRecording({ shouldTranscribe: false }) - }, [audioInputRuntimeReady, isRecordingAudio]) - - useEffect(() => { - if (activeSidebarMode === 'chats' || !isRecordingAudio) { - return - } - stopAudioRecording() - }, [activeSidebarMode, isRecordingAudio]) - - useEffect(() => { - return () => { - audioTranscriptionAbortRef.current?.abort() - clearAudioTimers() - const recorder = audioRecorderRef.current - if (recorder) { - recorder.ondataavailable = null - recorder.onstop = null - recorder.onerror = null - try { - if (recorder.state !== 'inactive') { - recorder.stop() - } - } catch {} - } - stopMediaStream(audioStreamRef.current) - } - }, []) - useEffect(() => { if (!settingsLoaded || loading || !backendApiUrl || startupOllamaCheckRanRef.current) return startupOllamaCheckRanRef.current = true