amend max channels reference

master
andrekir 2022-08-15 22:05:10 -03:00
rodzic d93916368c
commit e043a3aa9a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1290,7 +1290,7 @@ class MeshService : Service(), Logging {
private fun fixupChannelList(lIn: List<ChannelProtos.Channel>): Array<ChannelProtos.Channel> {
// When updating old firmware, we will briefly be told that there is zero channels
val maxChannels =
max(myNodeInfo?.maxChannels ?: 10, 10) // If we don't have my node info, assume 10 channels
max(myNodeInfo?.maxChannels ?: 8, 8) // If we don't have my node info, assume 8 channels (source: apponly.options)
val l = lIn.toMutableList()
while (l.size < maxChannels) {
val b = ChannelProtos.Channel.newBuilder()