* touch

* increase TTL of announcements

* ui touches
This commit is contained in:
callebtc
2025-07-31 06:28:31 +02:00
committed by GitHub
parent 4cb5932fd0
commit 4d0419c536
6 changed files with 11 additions and 13 deletions
@@ -728,7 +728,6 @@ class BluetoothMeshService(private val context: Context) {
ttl = MAX_TTL, ttl = MAX_TTL,
senderID = myPeerID, senderID = myPeerID,
payload = announcementData, payload = announcementData,
) )
connectionManager.broadcastPacket(RoutedPacket(packet)) connectionManager.broadcastPacket(RoutedPacket(packet))
@@ -36,7 +36,6 @@ class NoiseSessionManager(
*/ */
fun getSession(peerID: String): NoiseSession? { fun getSession(peerID: String): NoiseSession? {
val session = sessions[peerID] val session = sessions[peerID]
// Log.d(TAG, "getSession($peerID): ${if (session?.isEstablished() == true) "ESTABLISHED" else "NOT_FOUND"}")
return session return session
} }
@@ -88,7 +88,7 @@ fun ChatScreen(viewModel: ChatViewModel) {
// Use WindowInsets to handle keyboard properly // Use WindowInsets to handle keyboard properly
Box(modifier = Modifier.fillMaxSize()) { Box(modifier = Modifier.fillMaxSize()) {
val headerHeight = 36.dp val headerHeight = 42.dp
// Main content area that responds to keyboard/window insets // Main content area that responds to keyboard/window insets
Column( Column(
@@ -69,7 +69,7 @@ fun SidebarOverlay(
modifier = Modifier modifier = Modifier
.fillMaxHeight() .fillMaxHeight()
.weight(1f) .weight(1f)
.background(colorScheme.surface) .background(colorScheme.background.copy(alpha = 0.95f))
.windowInsetsPadding(WindowInsets.statusBars) // Add status bar padding .windowInsetsPadding(WindowInsets.statusBars) // Add status bar padding
) { ) {
SidebarHeader() SidebarHeader()
@@ -133,9 +133,9 @@ private fun SidebarHeader() {
Row( Row(
modifier = Modifier modifier = Modifier
.height(36.dp) // Match reduced main header height .height(42.dp) // Match reduced main header height
.fillMaxWidth() .fillMaxWidth()
.background(colorScheme.surface.copy(alpha = 0.95f)) .background(colorScheme.background.copy(alpha = 0.95f))
.padding(horizontal = 12.dp), .padding(horizontal = 12.dp),
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
@@ -248,9 +248,9 @@ fun PeopleSection(
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
Icon( Icon(
imageVector = Icons.Default.Person, // Using Person icon for people imageVector = Icons.Default.Group, // Using Person icon for people
contentDescription = null, contentDescription = null,
modifier = Modifier.size(10.dp), modifier = Modifier.size(12.dp),
tint = colorScheme.onSurface.copy(alpha = 0.6f) tint = colorScheme.onSurface.copy(alpha = 0.6f)
) )
Spacer(modifier = Modifier.width(6.dp)) Spacer(modifier = Modifier.width(6.dp))
@@ -9,14 +9,14 @@ import androidx.compose.ui.graphics.Color
// Colors that match the iOS bitchat theme // Colors that match the iOS bitchat theme
private val DarkColorScheme = darkColorScheme( private val DarkColorScheme = darkColorScheme(
primary = Color(0xFF00FF00), // Bright green (terminal-like) primary = Color(0xFF39FF14), // Bright green (terminal-like)
onPrimary = Color.Black, onPrimary = Color.Black,
secondary = Color(0xFF00CC00), // Darker green secondary = Color(0xFF2ECB10), // Darker green
onSecondary = Color.Black, onSecondary = Color.Black,
background = Color.Black, background = Color.Black,
onBackground = Color(0xFF00FF00), // Green on black onBackground = Color(0xFF39FF14), // Green on black
surface = Color(0xFF111111), // Very dark gray surface = Color(0xFF111111), // Very dark gray
onSurface = Color(0xFF00FF00), // Green text onSurface = Color(0xFF39FF14), // Green text
error = Color(0xFFFF5555), // Red for errors error = Color(0xFFFF5555), // Red for errors
onError = Color.Black onError = Color.Black
) )
+1 -1
View File
@@ -16,7 +16,7 @@
<string name="online_users">Online Users</string> <string name="online_users">Online Users</string>
<string name="no_one_connected">No one connected</string> <string name="no_one_connected">No one connected</string>
<string name="emergency_clear_hint">Triple tap to clear all data</string> <string name="emergency_clear_hint">Triple tap to clear all data</string>
<string name="your_network">Your Network</string> <string name="your_network">Network</string>
<!-- Battery Optimization Strings --> <!-- Battery Optimization Strings -->
<string name="battery_optimization_detected">Battery Optimization Detected</string> <string name="battery_optimization_detected">Battery Optimization Detected</string>