mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix #231 message history disappears thanks @dylanhoen
// Now that we use data packets for more things, we need to be choosier about what we keep. Since (currently - in the future less so)
// we only care about old text messages, we just store those...
This commit is contained in:
parent
9c15e22b8f
commit
4a5e07e52f
2 changed files with 16 additions and 11 deletions
|
|
@ -805,8 +805,9 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
registerMeshReceiver()
|
||||
|
||||
// Init our messages table with the service's record of past text messages (ignore all other message types)
|
||||
val allMsgs = service.oldMessages
|
||||
val msgs =
|
||||
service.oldMessages.filter { p -> p.dataType == Portnums.PortNum.TEXT_MESSAGE_APP_VALUE }
|
||||
allMsgs.filter { p -> p.dataType == Portnums.PortNum.TEXT_MESSAGE_APP_VALUE }
|
||||
debug("Service provided ${msgs.size} messages and myNodeNum ${service.myNodeInfo?.myNodeNum}")
|
||||
model.myNodeInfo.value = service.myNodeInfo
|
||||
model.messagesState.setMessages(msgs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue