feat: add option to delete traceroute log

This commit is contained in:
andrekir 2024-10-26 05:57:18 -03:00
parent abb4db8faf
commit cfb38e9951
4 changed files with 59 additions and 9 deletions

View file

@ -67,6 +67,10 @@ class MeshLogRepository @Inject constructor(private val meshLogDaoLazy: dagger.L
meshLogDao.deleteAll()
}
suspend fun deleteLog(uuid: String) = withContext(Dispatchers.IO) {
meshLogDao.deleteLog(uuid)
}
companion object {
private const val MAX_ITEMS = 500
private const val MAX_MESH_PACKETS = 10000

View file

@ -33,4 +33,7 @@ interface MeshLogDao {
@Query("DELETE FROM log")
fun deleteAll()
@Query("DELETE FROM log WHERE uuid = :uuid")
fun deleteLog(uuid: String)
}