kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: incorrect admin channel index retrieval logic
was returning -1 instead of 0 when no admin channel configured.pull/639/head
rodzic
9869a9208b
commit
93ac0186fe
|
@ -457,7 +457,8 @@ class MeshService : Service(), Logging {
|
||||||
|
|
||||||
/// Admin channel index
|
/// Admin channel index
|
||||||
private val adminChannelIndex: Int
|
private val adminChannelIndex: Int
|
||||||
get() = channelSet.settingsList.map { it.name.lowercase() }.indexOf("admin")
|
get() = channelSet.settingsList.indexOfFirst { it.name.lowercase() == "admin" }
|
||||||
|
.coerceAtLeast(0)
|
||||||
|
|
||||||
/// Generate a new mesh packet builder with our node as the sender, and the specified node num
|
/// Generate a new mesh packet builder with our node as the sender, and the specified node num
|
||||||
private fun newMeshPacketTo(idNum: Int) = MeshPacket.newBuilder().apply {
|
private fun newMeshPacketTo(idNum: Int) = MeshPacket.newBuilder().apply {
|
||||||
|
|
Ładowanie…
Reference in New Issue