mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2025-12-23 15:57:55 -05: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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user