mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: position logs
This commit is contained in:
parent
26f210047d
commit
adbe5952fc
8 changed files with 392 additions and 12 deletions
|
|
@ -71,6 +71,10 @@ class MeshLogRepository @Inject constructor(private val meshLogDaoLazy: dagger.L
|
|||
meshLogDao.deleteLog(uuid)
|
||||
}
|
||||
|
||||
suspend fun deleteLogs(nodeNum: Int, portNum: Int) = withContext(Dispatchers.IO) {
|
||||
meshLogDao.deleteLogs(nodeNum, portNum)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val MAX_ITEMS = 500
|
||||
private const val MAX_MESH_PACKETS = 10000
|
||||
|
|
|
|||
|
|
@ -36,4 +36,7 @@ interface MeshLogDao {
|
|||
|
||||
@Query("DELETE FROM log WHERE uuid = :uuid")
|
||||
fun deleteLog(uuid: String)
|
||||
|
||||
@Query("DELETE FROM log WHERE from_num = :fromNum AND port_num = :portNum")
|
||||
fun deleteLogs(fromNum: Int, portNum: Int)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue