fix: ensure proper channel updates to ChannelSetRepository

This commit is contained in:
andrekir 2023-05-21 06:04:53 -03:00
parent a2388d1d12
commit 8151aceea4
5 changed files with 70 additions and 38 deletions

View file

@ -1715,7 +1715,6 @@ class MeshService : Service(), Logging {
override fun setRemoteChannel(destNum: Int, payload: ByteArray?) = toRemoteExceptions {
val channel = ChannelProtos.Channel.parseFrom(payload)
sendToRadio(newMeshPacketTo(destNum).buildAdminPacket { setChannel = channel })
if (destNum == myNodeNum) updateChannelSettings(channel) // Update our local copy
}
override fun getRemoteChannel(id: Int, destNum: Int, index: Int) = toRemoteExceptions {