|
|
|
@ -5,8 +5,9 @@ import android.content.pm.PackageManager |
|
|
|
import androidx.activity.compose.rememberLauncherForActivityResult |
|
|
|
import androidx.activity.compose.rememberLauncherForActivityResult |
|
|
|
import androidx.activity.result.contract.ActivityResultContracts |
|
|
|
import androidx.activity.result.contract.ActivityResultContracts |
|
|
|
import androidx.compose.foundation.background |
|
|
|
import androidx.compose.foundation.background |
|
|
|
import androidx.compose.foundation.interaction.MutableInteractionSource |
|
|
|
import androidx.compose.foundation.clickable |
|
|
|
import androidx.compose.foundation.layout.* |
|
|
|
import androidx.compose.foundation.layout.* |
|
|
|
|
|
|
|
import androidx.compose.foundation.shape.CircleShape |
|
|
|
import androidx.compose.foundation.shape.RoundedCornerShape |
|
|
|
import androidx.compose.foundation.shape.RoundedCornerShape |
|
|
|
import androidx.compose.material3.* |
|
|
|
import androidx.compose.material3.* |
|
|
|
import androidx.compose.runtime.* |
|
|
|
import androidx.compose.runtime.* |
|
|
|
@ -223,8 +224,19 @@ fun InputBar( |
|
|
|
|
|
|
|
|
|
|
|
if (!isRecording) { |
|
|
|
if (!isRecording) { |
|
|
|
Spacer(Modifier.width(4.dp)) |
|
|
|
Spacer(Modifier.width(4.dp)) |
|
|
|
Button(onClick = onSend, enabled = enabled && text.isNotBlank()) { |
|
|
|
val sendColor = MaterialTheme.colorScheme.primary |
|
|
|
Text("Send") |
|
|
|
val sendEnabled = enabled && text.isNotBlank() |
|
|
|
|
|
|
|
Box( |
|
|
|
|
|
|
|
modifier = Modifier |
|
|
|
|
|
|
|
.size(44.dp) |
|
|
|
|
|
|
|
.background( |
|
|
|
|
|
|
|
if (sendEnabled) sendColor else sendColor.copy(alpha = 0.35f), |
|
|
|
|
|
|
|
CircleShape |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
.clickable { if (sendEnabled) onSend() }, |
|
|
|
|
|
|
|
contentAlignment = Alignment.Center |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
Text("\u27A4", fontSize = 22.sp, color = Color.White) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|