don't let users try to send texts if we haven't received our node ID

I wanted an and not an or ;-)

Based on the autobug and the great report inhttps://github.com/meshtastic/Meshtastic-esp32/issues/102

I think this should fix the crash described in the messages screen.
pull/28/head
geeksville 2020-04-21 20:27:56 -07:00
rodzic 322db5ac25
commit 2dd37e791d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -172,7 +172,7 @@ class MessagesFragment : ScreenFragment("Messages"), Logging {
model.isConnected.observe(viewLifecycleOwner, Observer { connected ->
// If we don't know our node ID and we are offline don't let user try to send
textInputLayout.isEnabled =
connected != MeshService.ConnectionState.DISCONNECTED || model.nodeDB.myId.value != null
connected != MeshService.ConnectionState.DISCONNECTED && model.nodeDB.myId.value != null
})
}