update isConnected logic

pull/537/head
andrekir 2022-12-10 00:42:51 -03:00
rodzic d538c2afff
commit e816b03f47
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -302,7 +302,7 @@ class MessagesFragment : Fragment(), Logging {
// If connection state _OR_ myID changes we have to fix our ability to edit outgoing messages
model.connectionState.observe(viewLifecycleOwner) { connectionState ->
// If we don't know our node ID and we are offline don't let user try to send
isConnected = connectionState == MeshService.ConnectionState.CONNECTED
isConnected = connectionState != MeshService.ConnectionState.DISCONNECTED
binding.textInputLayout.isEnabled = isConnected
binding.sendButton.isEnabled = isConnected
for (subView: View in binding.quickChatLayout.allViews) {