diff --git a/android/src/components/VoiceButton.tsx b/android/src/components/VoiceButton.tsx index b645889..3839167 100644 --- a/android/src/components/VoiceButton.tsx +++ b/android/src/components/VoiceButton.tsx @@ -44,7 +44,6 @@ const VoiceButton: React.FC = ({ const [meterDb, setMeterDb] = useState(-160); const pulseAnim = useRef(new Animated.Value(1)).current; const durationTimer = useRef | null>(null); - const isLongPress = useRef(false); // Puls-Animation starten/stoppen useEffect(() => { @@ -117,31 +116,10 @@ const VoiceButton: React.FC = ({ if (disabled || isRecording) return; const started = await audioService.startRecording(true); // autoStop = true if (started) { - isLongPress.current = false; setIsRecording(true); } }, [disabled, isRecording]); - // Push-to-Talk: Lang druecken - const handlePressIn = async () => { - if (disabled || isRecording) return; - isLongPress.current = true; - const started = await audioService.startRecording(false); // kein autoStop - if (started) { - setIsRecording(true); - } - }; - - const handlePressOut = async () => { - if (!isRecording || !isLongPress.current) return; - isLongPress.current = false; - setIsRecording(false); - const result = await audioService.stopRecording(); - if (result && result.durationMs > 300) { - onRecordingComplete(result); - } - }; - // Tap-to-Talk: Einmal tippen startet mit Auto-Stop. // Guard gegen Doppel-Tap während asyncer Start/Stop. const tapBusy = useRef(false); @@ -162,7 +140,6 @@ const VoiceButton: React.FC = ({ // Aufnahme mit Auto-Stop starten const started = await audioService.startRecording(true); if (started) { - isLongPress.current = false; setIsRecording(true); } } @@ -201,10 +178,6 @@ const VoiceButton: React.FC = ({ isRecording && styles.buttonOuterRecording, { transform: [{ scale: pulseAnim }] }, ]} - onStartShouldSetResponder={() => true} - onResponderGrant={handlePressIn} - onResponderRelease={handlePressOut} - onResponderTerminate={handlePressOut} >