clustering isn't working, but we have the orientation button working now.

The nodechip that I've removed for some reason spawns (disabled, and invisible) over the compass - it's swallowing keypresses.
pull/2893/head
Dane Evans 2025-08-28 19:04:17 +10:00
rodzic 99c016c7e9
commit b10e5956de
1 zmienionych plików z 13 dodań i 2 usunięć

Wyświetl plik

@ -20,6 +20,7 @@ package com.geeksville.mesh.ui.map.components
import androidx.compose.runtime.Composable
import androidx.compose.runtime.key
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import com.geeksville.mesh.ui.map.BaseMapViewModel
import com.geeksville.mesh.ui.map.NodeClusterItem
import com.geeksville.mesh.ui.node.components.NodeChip
@ -64,7 +65,17 @@ fun NodeClusterMarkers(
false
},
clusterItemContent = { clusterItem ->
NodeChip(node = clusterItem.node, enabled = false, isThisNode = false, isConnected = false) {}
},
val shortNames = nodeClusterItems.joinToString { it.node.user.shortName }
println("NodeClusterMarkers: nodeClusterItems size: ${nodeClusterItems.size}, items: $shortNames")
// Use a transparent, non-interactive Text to show the shortname, but don't intercept clicks
androidx.compose.material3.Text(
text = if (nodeClusterItems.size > 1) "..." else clusterItem.node.user.shortName,
color = Color(0xFFFFFF00), // Bright yellow for visibility
fontWeight = FontWeight.Bold
)
}
)
}
private const val TAG = "NodeClusterMarkers"