mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix part of #11 - show sender name in notification
This commit is contained in:
parent
f13c05862d
commit
6c0e56920d
1 changed files with 3 additions and 1 deletions
|
|
@ -354,7 +354,9 @@ class MeshService : Service(), Logging {
|
|||
|
||||
// If a text message arrived include it with our notification
|
||||
recentReceivedText?.let { msg ->
|
||||
builder.setContentText("Message from ${msg.fromId}")
|
||||
// Try to show the human name of the sender if possible
|
||||
val sender = nodeDBbyID[msg.fromId]?.user?.longName ?: msg.fromId
|
||||
builder.setContentText("Message from $sender")
|
||||
|
||||
builder.setStyle(
|
||||
NotificationCompat.BigTextStyle()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue