mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
chore: prepare new strings for translation
This commit is contained in:
parent
95120ee208
commit
4a9be026e2
7 changed files with 27 additions and 27 deletions
|
|
@ -71,9 +71,6 @@ class NodeDB @Inject constructor(
|
|||
|
||||
fun myNodeInfoFlow(): Flow<MyNodeInfo?> = nodeInfoDao.getMyNodeInfo()
|
||||
|
||||
fun delNode(num: Int) {
|
||||
nodeInfoDao.delNode(num)
|
||||
}
|
||||
suspend fun upsert(node: NodeInfo) = withContext(Dispatchers.IO) {
|
||||
nodeInfoDao.upsert(node)
|
||||
}
|
||||
|
|
@ -86,4 +83,8 @@ class NodeDB @Inject constructor(
|
|||
putAll(nodes)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun deleteNode(num: Int) = withContext(Dispatchers.IO) {
|
||||
nodeInfoDao.deleteNode(num)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,17 +316,16 @@ class UIViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
fun forgetNode(nodeNum: Int) {
|
||||
fun removeNode(nodeNum: Int) = viewModelScope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
val packetId = meshService?.packetId ?: return
|
||||
val packetId = meshService?.packetId ?: return@launch
|
||||
meshService?.removeByNodenum(packetId, nodeNum)
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
nodeDB.delNode(nodeNum)
|
||||
}
|
||||
nodeDB.deleteNode(nodeNum)
|
||||
} catch (ex: RemoteException) {
|
||||
errormsg("Request traceroute error: ${ex.message}")
|
||||
}
|
||||
}
|
||||
|
||||
fun requestPosition(destNum: Int, position: Position = Position(0.0, 0.0, 0)) {
|
||||
try {
|
||||
meshService?.requestPosition(destNum, position)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue