kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix autobug with channels being only one entry long
rodzic
be06353267
commit
0f384fc62f
|
@ -1392,7 +1392,7 @@ class MeshService : Service(), Logging {
|
||||||
private fun fixupChannelList(lIn: List<ChannelProtos.Channel>): Array<ChannelProtos.Channel> {
|
private fun fixupChannelList(lIn: List<ChannelProtos.Channel>): Array<ChannelProtos.Channel> {
|
||||||
// When updating old firmware, we will briefly be told that there is zero channels
|
// When updating old firmware, we will briefly be told that there is zero channels
|
||||||
val maxChannels =
|
val maxChannels =
|
||||||
max(myNodeInfo?.maxChannels ?: 8, 1) // If we don't have my node info, assume 8 channels
|
max(myNodeInfo?.maxChannels ?: 8, 8) // If we don't have my node info, assume 8 channels
|
||||||
var l = lIn
|
var l = lIn
|
||||||
while (l.size < maxChannels) {
|
while (l.size < maxChannels) {
|
||||||
val b = ChannelProtos.Channel.newBuilder()
|
val b = ChannelProtos.Channel.newBuilder()
|
||||||
|
|
Ładowanie…
Reference in New Issue