mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
don't let users try to send texts if we don't have a node id
This commit is contained in:
parent
547e59754d
commit
fdd3b48364
2 changed files with 9 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ class NodeDB(private val ui: UIViewModel) {
|
|||
private val seedWithTestNodes = isEmulator
|
||||
|
||||
/// The unique ID of our node
|
||||
val myId = object : MutableLiveData<String>(if (isEmulator) "+16508765309" else "invalid") {}
|
||||
val myId = object : MutableLiveData<String?>(if (isEmulator) "+16508765309" else null) {}
|
||||
|
||||
/// A map from nodeid to to nodeinfo
|
||||
val nodes =
|
||||
|
|
@ -53,5 +53,5 @@ class NodeDB(private val ui: UIViewModel) {
|
|||
.toTypedArray())) {}
|
||||
|
||||
/// Could be null if we haven't received our node DB yet
|
||||
val ourNodeInfo get() = nodes.value!![myId.value]
|
||||
val ourNodeInfo get() = nodes.value?.get(myId.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue