mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
81dc625c70
commit
e701ad6aee
12 changed files with 68 additions and 14 deletions
|
|
@ -182,8 +182,20 @@ interface NodeInfoDao {
|
|||
lastHeardMin: Int,
|
||||
): Flow<List<NodeWithRelations>>
|
||||
|
||||
@Transaction
|
||||
fun clearNodeInfo(preserveFavorites: Boolean) {
|
||||
if (preserveFavorites) {
|
||||
deleteNonFavoriteNodes()
|
||||
} else {
|
||||
deleteAllNodes()
|
||||
}
|
||||
}
|
||||
|
||||
@Query("DELETE FROM nodes WHERE is_favorite = 0")
|
||||
fun deleteNonFavoriteNodes()
|
||||
|
||||
@Query("DELETE FROM nodes")
|
||||
fun clearNodeInfo()
|
||||
fun deleteAllNodes()
|
||||
|
||||
@Query("DELETE FROM nodes WHERE num=:num")
|
||||
fun deleteNode(num: Int)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue