mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Display relay node information for messages (#3574)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
7d1c5cba4c
commit
453dd398d4
10 changed files with 840 additions and 16 deletions
|
|
@ -42,7 +42,6 @@ import org.meshtastic.core.model.util.onlineTimeThreshold
|
|||
import org.meshtastic.proto.MeshProtos
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
import kotlin.collections.map
|
||||
|
||||
@Singleton
|
||||
@Suppress("TooManyFunctions")
|
||||
|
|
@ -94,8 +93,20 @@ constructor(
|
|||
fun getUser(userId: String): MeshProtos.User = nodeDBbyNum.value.values.find { it.user.id == userId }?.user
|
||||
?: MeshProtos.User.newBuilder()
|
||||
.setId(userId)
|
||||
.setLongName("Meshtastic ${userId.takeLast(n = 4)}")
|
||||
.setShortName(userId.takeLast(n = 4))
|
||||
.setLongName(
|
||||
if (userId == "^local") {
|
||||
"Local"
|
||||
} else {
|
||||
"Meshtastic ${userId.takeLast(n = 4)}"
|
||||
},
|
||||
)
|
||||
.setShortName(
|
||||
if (userId == "^local") {
|
||||
"Local"
|
||||
} else {
|
||||
userId.takeLast(n = 4)
|
||||
},
|
||||
)
|
||||
.setHwModel(MeshProtos.HardwareModel.UNSET)
|
||||
.build()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue