@ -167,27 +167,20 @@ fun InputBar(
Spacer ( Modifier . width ( 4. dp ) )
Spacer ( Modifier . width ( 4. dp ) )
if ( isRecording && isRecordingLocked ) {
if ( isRecording && isRecordingLocked ) {
/* Locked: cancel + send voice */
/* Locked: cancel + send voice — PTT box replaced by action buttons */
IconButton ( onClick = onVoiceCancel ) {
IconButton ( onClick = onVoiceCancel ) {
Text ( " \u2715 " , fontSize = 20. sp , color = Color ( 0xFFE53935 ) )
Text ( " \u2715 " , fontSize = 20. sp , color = Color ( 0xFFE53935 ) )
}
}
IconButton ( onClick = onVoiceSend ) {
IconButton ( onClick = onVoiceSend ) {
Text ( " \u25B6 " , fontSize = 20. sp , color = Color ( 0xFF4CAF50 ) )
Text ( " \u25B6 " , fontSize = 20. sp , color = Color ( 0xFF4CAF50 ) )
}
}
} else if ( isRecording ) {
/* Holding: only PTT active */
IconButton (
onClick = { } ,
enabled = true ,
modifier = Modifier . background ( Color ( 0xFFE53935 ) , RoundedCornerShape ( 4. dp ) )
) {
Text ( " \uD83C \uDFA4 " , fontSize = 20. sp )
}
} else {
} else {
/* Idle: PTT + send */
/* PTT Box — always present (same identity), just changes appearance */
val pttBg = if ( isRecording ) Color ( 0xFFE53935 ) else Color . Transparent
Box (
Box (
modifier = Modifier
modifier = Modifier
. size ( 48. dp )
. size ( 48. dp )
. background ( pttBg , RoundedCornerShape ( 4. dp ) )
. pointerInput ( hasMicPerm ) {
. pointerInput ( hasMicPerm ) {
awaitPointerEventScope {
awaitPointerEventScope {
val down = awaitPointerEvent ( )
val down = awaitPointerEvent ( )
@ -223,13 +216,14 @@ fun InputBar(
} ,
} ,
contentAlignment = Alignment . Center
contentAlignment = Alignment . Center
) {
) {
Text ( " \uD83C \uDFA4 " , fontSize = 20. sp )
Text ( " \uD83C \uDFA4 " , fontSize = 20. sp , color = if ( isRecording ) Color . White else Color . Unspecified )
}
}
Spacer ( Modifier . width ( 4. dp ) )
if ( !is Recording ) {
Spacer ( Modifier . width ( 4. dp ) )
Button ( onClick = onSend , enabled = enabled && text . isNotBlank ( ) ) {
Button ( onClick = onSend , enabled = enabled && text . isNotBlank ( ) ) {
Text ( " Send " )
Text ( " Send " )
}
}
}
}
}
}
}