Merge pull request #79 from geeksville/dev

Dev
This commit is contained in:
Kevin Hester 2020-07-01 18:11:09 -07:00 committed by GitHub
commit 8d8db3d502
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 12 deletions

View file

@ -1,10 +1,7 @@
# Remaining tasks before declaring 1.0
- feh123 problem sony
- fix release build inclusion of firmware - per https://developer.android.com/studio/build/build-variants
- Android frontend should refetch the android messages from backend service on Resume
- disable software update button after update finishes
- first message sent is still doubled for some people
- disable software update button after update finishes
- let users set arbitrary params in android
- add a low level settings screen (let user change any of the RadioConfig parameters)

View file

@ -17,8 +17,8 @@ android {
applicationId "com.geeksville.mesh"
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
targetSdkVersion 29
versionCode 10784 // format is Mmmss (where M is 1+the numeric major number
versionName "0.7.84"
versionCode 10785 // format is Mmmss (where M is 1+the numeric major number
versionName "0.7.85"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View file

@ -423,7 +423,7 @@ class MainActivity : AppCompatActivity(), Logging,
private fun updateConnectionStatusImage(connected: MeshService.ConnectionState) {
if (actionBarMenu==null)
if (actionBarMenu == null)
return
val (image, tooltip) = when (connected) {
@ -736,7 +736,9 @@ class MainActivity : AppCompatActivity(), Logging,
registerMeshReceiver()
// Init our messages table with the service's record of past text messages
model.messagesState.messages.value = service.oldMessages
val msgs = service.oldMessages
debug("Service provided ${msgs.size} messages")
model.messagesState.messages.value = msgs
val connectionState =
MeshService.ConnectionState.valueOf(service.connectionState())

View file

@ -605,13 +605,13 @@ class MeshService : Service(), Logging {
}
/**
* discard entire node db & message state - used when changing radio channels
* discard entire node db & message state - used when downloading a new db from the device
*/
private fun discardNodeDB() {
myNodeInfo = null
nodeDBbyNodeNum.clear()
nodeDBbyID.clear()
recentDataPackets.clear()
// recentDataPackets.clear() We do NOT want to clear this, because it is the record of old messages the GUI still might want to show
haveNodeDB = false
}
@ -1024,6 +1024,9 @@ class MeshService : Service(), Logging {
/// Perform all the steps needed once we start waiting for device sleep to complete
fun startDeviceSleep() {
// Just in case the user uncleanly reboots the phone, save now (we normally save in onDestroy)
saveSettings()
// lost radio connection, therefore no need to keep listening to GPS
stopLocationRequests()

View file

@ -187,7 +187,8 @@ class MessagesFragment : ScreenFragment("Messages"), Logging {
layoutManager.stackFromEnd = true // We want the last rows to always be shown
messageListView.layoutManager = layoutManager
model.messagesState.messages.observe(viewLifecycleOwner, Observer { it ->
model.messagesState.messages.observe(viewLifecycleOwner, Observer {
debug("New messages received: ${it.size}")
messagesAdapter.onMessagesChanged(it)
})

@ -1 +1 @@
Subproject commit 9f83006768de5ca714f4c43e723a3477a91d0713
Subproject commit 10d3b2e62b26d41b9b2568eefb3c207442c1cc5c