From 65d832ef99e2d12803e302e05db04ce80ff22542 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Tue, 26 Nov 2024 06:57:10 +0800 Subject: [PATCH] Change max message length to 200 (#1429) --- app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt | 4 ++-- config/detekt/detekt-baseline.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt index 704966499..4b330a5f2 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt @@ -140,8 +140,8 @@ class MessagesFragment : Fragment(), Logging { sendMessageInputText() } - // max payload length should be 237 bytes but anything over 235 bytes crashes the radio - binding.messageInputText.filters += Utf8ByteLengthFilter(234) + // max payload length should be 237 bytes but anything over 200 becomes less reliable + binding.messageInputText.filters += Utf8ByteLengthFilter(200) binding.messageListView.setContent { val messages by model.getMessagesFrom(contactKey).collectAsStateWithLifecycle(listOf()) diff --git a/config/detekt/detekt-baseline.xml b/config/detekt/detekt-baseline.xml index b12339f1d..927f9a593 100644 --- a/config/detekt/detekt-baseline.xml +++ b/config/detekt/detekt-baseline.xml @@ -284,7 +284,7 @@ MagicNumber:MeshService.kt$MeshService$32 MagicNumber:MeshService.kt$MeshService$60000 MagicNumber:MeshService.kt$MeshService$8 - MagicNumber:MessagesFragment.kt$MessagesFragment$234 + MagicNumber:MessagesFragment.kt$MessagesFragment$200 MagicNumber:MetricsViewModel.kt$MetricsViewModel$1000L MagicNumber:MetricsViewModel.kt$MetricsViewModel$1e-5 MagicNumber:MetricsViewModel.kt$MetricsViewModel$1e-7