mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: set user.id in NodeDb getUser
This commit updates the `getUser` function in `NodeDB` to set the ID of the user when creating a new `User` object, ensuring that the user ID is always populated. Additionally, it refactors the `Message` class to use the proto `User` object instead of the `MeshUser` class. This change simplifies the code and improves consistency by utilizing the proto definition for user information.
This commit is contained in:
parent
61906839af
commit
6447485199
3 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package com.geeksville.mesh.model
|
||||
|
||||
import com.geeksville.mesh.MeshProtos
|
||||
import com.geeksville.mesh.MeshProtos.Routing
|
||||
import com.geeksville.mesh.MeshUser
|
||||
import com.geeksville.mesh.MessageStatus
|
||||
import com.geeksville.mesh.R
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ val Routing.Error.stringRes: Int
|
|||
data class Message(
|
||||
val uuid: Long,
|
||||
val receivedTime: Long,
|
||||
val user: MeshUser,
|
||||
val user: MeshProtos.User,
|
||||
val text: String,
|
||||
val time: Long,
|
||||
val read: Boolean,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue