fix: reaction display regression (#4141)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-01-05 13:32:25 -06:00 committed by GitHub
parent 8400ae854f
commit 6bb54bcd55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 14 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Meshtastic LLC
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.meshtastic.core.data.repository
import androidx.lifecycle.Lifecycle
@ -109,15 +108,15 @@ constructor(
?: MeshProtos.User.newBuilder()
.setId(userId)
.setLongName(
if (userId == "^local") {
"Local"
if (userId == DataPacket.ID_LOCAL) {
ourNodeInfo.value?.user?.longName ?: "Local"
} else {
"Meshtastic ${userId.takeLast(n = 4)}"
},
)
.setShortName(
if (userId == "^local") {
"Local"
if (userId == DataPacket.ID_LOCAL) {
ourNodeInfo.value?.user?.shortName ?: "Local"
} else {
userId.takeLast(n = 4)
},