fix early ownerName null call

This commit is contained in:
andrekir
2022-11-15 16:31:35 -03:00
parent 068a90f93b
commit 57030f90b6

View File

@@ -263,7 +263,7 @@ class UIViewModel @Inject constructor(
try {
// Pull down our real node ID - This must be done AFTER reading the nodedb because we need the DB to find our nodeinof object
nodeDB.setMyId(service.myId)
val ownerName = nodeDB.ourNodeInfo.value?.user?.longName
val ownerName = nodes[service.myId]?.user?.longName
_ownerName.value = ownerName
} catch (ex: Exception) {
warn("Ignoring failure to get myId, service is probably just uninited... ${ex.message}")