mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: replace lowercase() with equals()
This commit is contained in:
parent
bb3b1eaa85
commit
952bca3b14
2 changed files with 4 additions and 3 deletions
|
|
@ -541,8 +541,9 @@ class UIViewModel @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val adminChannelIndex: Int
|
val adminChannelIndex: Int /** matches [MeshService.adminChannelIndex] **/
|
||||||
get() = channelSet.settingsList.map { it.name.lowercase() }.indexOf("admin")
|
get() = channelSet.settingsList.indexOfFirst { it.name.equals("admin", ignoreCase = true) }
|
||||||
|
.coerceAtLeast(0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the persisted packet data out to a CSV file in the specified location.
|
* Write the persisted packet data out to a CSV file in the specified location.
|
||||||
|
|
|
||||||
|
|
@ -466,7 +466,7 @@ class MeshService : Service(), Logging {
|
||||||
|
|
||||||
/// Admin channel index
|
/// Admin channel index
|
||||||
private val adminChannelIndex: Int
|
private val adminChannelIndex: Int
|
||||||
get() = channelSet.settingsList.indexOfFirst { it.name.lowercase() == "admin" }
|
get() = channelSet.settingsList.indexOfFirst { it.name.equals("admin", ignoreCase = true) }
|
||||||
.coerceAtLeast(0)
|
.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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue