mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 03:45:21 +00:00
input
This commit is contained in:
@@ -278,7 +278,15 @@ private fun ChannelHeader(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
IconButton(onClick = onBackClick) {
|
||||
// Use same back button style as DM header (Button instead of IconButton)
|
||||
Button(
|
||||
onClick = onBackClick,
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = Color.Transparent,
|
||||
contentColor = colorScheme.primary
|
||||
),
|
||||
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 4.dp)
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
@@ -299,10 +307,11 @@ private fun ChannelHeader(
|
||||
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
|
||||
// Centered title with orange color to match DM input field
|
||||
Text(
|
||||
text = "channel: $channel",
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = Color(0xFF0080FF), // Blue
|
||||
color = Color(0xFFFF8C00), // Orange to match input field
|
||||
modifier = Modifier.clickable { onSidebarClick() }
|
||||
)
|
||||
|
||||
|
||||
@@ -44,17 +44,13 @@ fun MessageInput(
|
||||
modifier = modifier.padding(horizontal = 12.dp, vertical = 8.dp), // Reduced padding
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
// Fixed: Remove arrow from private message input
|
||||
// Remove arrow from both private and channel inputs to match DM style
|
||||
Text(
|
||||
text = when {
|
||||
selectedPrivatePeer != null -> "<@$nickname>" // Removed arrow for private
|
||||
currentChannel != null -> "<@$nickname> →" // Keep arrow for channels
|
||||
else -> "<@$nickname>"
|
||||
},
|
||||
text = "<@$nickname>", // No arrow for both private and channel
|
||||
style = MaterialTheme.typography.bodySmall.copy(fontWeight = FontWeight.Medium),
|
||||
color = when {
|
||||
selectedPrivatePeer != null -> Color(0xFFFF8C00) // Orange for private
|
||||
currentChannel != null -> Color(0xFFFF8C00) // Orange if encrypted channel
|
||||
currentChannel != null -> Color(0xFFFF8C00) // Orange for channels too
|
||||
else -> colorScheme.primary
|
||||
},
|
||||
fontFamily = FontFamily.Monospace
|
||||
@@ -78,7 +74,7 @@ fun MessageInput(
|
||||
|
||||
Spacer(modifier = Modifier.width(8.dp)) // Reduced spacing
|
||||
|
||||
// Fixed: Make send button orange in private mode to match nickname color
|
||||
// Update send button to match input field colors
|
||||
IconButton(
|
||||
onClick = onSend,
|
||||
modifier = Modifier.size(32.dp)
|
||||
@@ -87,8 +83,8 @@ fun MessageInput(
|
||||
modifier = Modifier
|
||||
.size(30.dp)
|
||||
.background(
|
||||
color = if (selectedPrivatePeer != null) {
|
||||
// Orange for private messages to match nickname color
|
||||
color = if (selectedPrivatePeer != null || currentChannel != null) {
|
||||
// Orange for both private messages and channels to match nickname color
|
||||
Color(0xFFFF8C00).copy(alpha = 0.75f)
|
||||
} else if (colorScheme.background == Color.Black) {
|
||||
Color(0xFF00FF00).copy(alpha = 0.75f) // Bright green for dark theme
|
||||
@@ -103,8 +99,8 @@ fun MessageInput(
|
||||
imageVector = Icons.Filled.KeyboardArrowUp,
|
||||
contentDescription = "Send message",
|
||||
modifier = Modifier.size(20.dp),
|
||||
tint = if (selectedPrivatePeer != null) {
|
||||
// Black arrow on orange in private mode
|
||||
tint = if (selectedPrivatePeer != null || currentChannel != null) {
|
||||
// Black arrow on orange for both private and channel modes
|
||||
Color.Black
|
||||
} else if (colorScheme.background == Color.Black) {
|
||||
Color.Black // Black arrow on bright green in dark theme
|
||||
|
||||
@@ -193,7 +193,7 @@ fun ChannelsSection(
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Text(
|
||||
text = "#$channel",
|
||||
text = channel, // Channel already contains the # prefix
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = if (isSelected) colorScheme.primary else colorScheme.onSurface,
|
||||
fontWeight = if (isSelected) FontWeight.Medium else FontWeight.Normal,
|
||||
|
||||
Reference in New Issue
Block a user