mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
deleteMessage index by packet id
This commit is contained in:
parent
7d611c9a9a
commit
0b0d82dc76
4 changed files with 28 additions and 32 deletions
|
|
@ -1753,10 +1753,12 @@ class MeshService : Service(), Logging {
|
|||
this@MeshService.setOwner(myId, longName, shortName)
|
||||
}
|
||||
|
||||
override fun delete(position: Int) {
|
||||
if (position >= 0) {
|
||||
recentDataPackets.removeAt(position)
|
||||
}
|
||||
override fun deleteMessage(packetId: Int) {
|
||||
val packet = recentDataPackets.find {it.id == packetId}
|
||||
if (packet != null) {
|
||||
recentDataPackets.remove(packet)
|
||||
debug("Deleting message id=${packet.id}")
|
||||
} else debug("Nothing to delete, message id=${packetId} not found")
|
||||
}
|
||||
|
||||
override fun deleteAllMessages() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue