mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix node id lookups
This commit is contained in:
parent
2c8c7ac8d6
commit
b5fc637f30
5 changed files with 37 additions and 22 deletions
|
|
@ -495,8 +495,9 @@ class MeshService : Service(), Logging {
|
|||
/// Update our DB of users based on someone sending out a User subpacket
|
||||
private fun handleReceivedUser(fromNum: Int, p: MeshProtos.User) {
|
||||
updateNodeInfo(fromNum) {
|
||||
val oldId = it.user?.id.orEmpty()
|
||||
it.user = MeshUser(
|
||||
p.id,
|
||||
if (p.id.isNotEmpty()) p.id else oldId, // If the new update doesn't contain an ID keep our old value
|
||||
p.longName,
|
||||
p.shortName
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue