mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: incorrect admin channel index retrieval logic
was returning -1 instead of 0 when no admin channel configured.
This commit is contained in:
parent
9869a9208b
commit
93ac0186fe
1 changed files with 2 additions and 1 deletions
|
|
@ -457,7 +457,8 @@ class MeshService : Service(), Logging {
|
|||
|
||||
/// Admin channel index
|
||||
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
|
||||
private fun newMeshPacketTo(idNum: Int) = MeshPacket.newBuilder().apply {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue