sforkowany z mirror/meshtastic-android
fix message not allowed to be queued while sleeping (I think)
rodzic
7e21d63044
commit
28fec09a54
|
@ -1465,7 +1465,7 @@ class MeshService : Service(), Logging {
|
|||
/// If we've received our initial config, our radio settings and all of our channels, send any queueed packets and broadcast connected to clients
|
||||
private fun onHasSettings() {
|
||||
|
||||
processEarlyPackets() // send receive any packets that were queued up
|
||||
processEarlyPackets() // send any packets that were queued up
|
||||
|
||||
// broadcast an intent with our new connection state
|
||||
serviceBroadcasts.broadcastConnection()
|
||||
|
|
|
@ -252,7 +252,10 @@ class MessagesFragment : ScreenFragment("Messages"), Logging {
|
|||
// If connection state _OR_ myID changes we have to fix our ability to edit outgoing messages
|
||||
fun updateTextEnabled() {
|
||||
binding.textInputLayout.isEnabled =
|
||||
model.isConnected.value != MeshService.ConnectionState.DISCONNECTED && model.nodeDB.myId.value != null && model.radioConfig.value != null
|
||||
model.isConnected.value != MeshService.ConnectionState.DISCONNECTED
|
||||
|
||||
// Just being connected is enough to allow sending texts I think
|
||||
// && model.nodeDB.myId.value != null && model.radioConfig.value != null
|
||||
}
|
||||
|
||||
model.isConnected.observe(viewLifecycleOwner, Observer { _ ->
|
||||
|
@ -260,7 +263,7 @@ class MessagesFragment : ScreenFragment("Messages"), Logging {
|
|||
updateTextEnabled()
|
||||
})
|
||||
|
||||
model.nodeDB.myId.observe(viewLifecycleOwner, Observer { _ ->
|
||||
/* model.nodeDB.myId.observe(viewLifecycleOwner, Observer { _ ->
|
||||
// If we don't know our node ID and we are offline don't let user try to send
|
||||
updateTextEnabled()
|
||||
})
|
||||
|
@ -268,7 +271,7 @@ class MessagesFragment : ScreenFragment("Messages"), Logging {
|
|||
model.radioConfig.observe(viewLifecycleOwner, Observer { _ ->
|
||||
// If we don't know our node ID and we are offline don't let user try to send
|
||||
updateTextEnabled()
|
||||
})
|
||||
}) */
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue