From 1a8d1c672513107aa5a5a20f4289ddb806fcc752 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Wed, 16 Dec 2020 12:24:26 +0800 Subject: [PATCH] 1.1.22 quick fix #207 - now that data is more uniform, only consider text packets --- app/build.gradle | 4 ++-- app/src/main/java/com/geeksville/mesh/MainActivity.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index b14092b21..6d4c9c306 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,8 +30,8 @@ android { applicationId "com.geeksville.mesh" minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 - versionCode 20121 // format is Mmmss (where M is 1+the numeric major number - versionName "1.1.21" + versionCode 20122 // format is Mmmss (where M is 1+the numeric major number + versionName "1.1.22" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt index 52a5152c1..b5686f564 100644 --- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt +++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt @@ -715,7 +715,7 @@ class MainActivity : AppCompatActivity(), Logging, model.messagesState.addMessage(payload) } else -> - errormsg("Unhandled dataType ${payload.dataType}") + warn("Ignored dataType ${payload.dataType}") } } @@ -798,8 +798,8 @@ class MainActivity : AppCompatActivity(), Logging, // We don't start listening for packets until after we are connected to the service registerMeshReceiver() - // Init our messages table with the service's record of past text messages - val msgs = service.oldMessages + // Init our messages table with the service's record of past text messages (ignore all other message types) + val msgs = service.oldMessages.filter { p -> p.dataType == Portnums.PortNum.TEXT_MESSAGE_APP_VALUE } debug("Service provided ${msgs.size} messages") model.messagesState.setMessages(msgs) val connectionState =