mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: nodes seen before full user exchange not being updated in phone NodeDB (#3996)
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
212bcfd945
commit
81654a095b
1 changed files with 13 additions and 1 deletions
|
|
@ -561,7 +561,13 @@ class MeshService : Service() {
|
|||
hwModel = MeshProtos.HardwareModel.UNSET
|
||||
}
|
||||
|
||||
NodeEntity(num = n, user = defaultUser, longName = defaultUser.longName, channel = channel)
|
||||
NodeEntity(
|
||||
num = n,
|
||||
user = defaultUser,
|
||||
longName = defaultUser.longName,
|
||||
shortName = defaultUser.shortName,
|
||||
channel = channel,
|
||||
)
|
||||
}
|
||||
|
||||
private val hexIdRegex = """!([0-9A-Fa-f]+)""".toRegex()
|
||||
|
|
@ -1046,6 +1052,9 @@ class MeshService : Service() {
|
|||
"kept='${it.user.longName}' (hwModel=${it.user.hwModel}), " +
|
||||
"skipped default='${p.longName}' (hwModel=UNSET)",
|
||||
)
|
||||
// Ensure denormalized columns are updated from preserved user data
|
||||
it.longName = it.user.longName
|
||||
it.shortName = it.user.shortName
|
||||
// Still update channel and verification status
|
||||
it.channel = channel
|
||||
it.manuallyVerified = manuallyVerified
|
||||
|
|
@ -1779,6 +1788,9 @@ class MeshService : Service() {
|
|||
"kept='${it.user.longName}' (hwModel=${it.user.hwModel}), " +
|
||||
"skipped default='${info.user.longName}' (hwModel=UNSET)",
|
||||
)
|
||||
// Ensure denormalized columns are updated from preserved user data
|
||||
it.longName = it.user.longName
|
||||
it.shortName = it.user.shortName
|
||||
} else {
|
||||
it.user =
|
||||
info.user.copy {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue