# Conflicts:
#	app/src/main/java/com/geeksville/mesh/service/MeshService.kt
pull/276/head^2
Kevin Hester 2021-03-27 17:29:46 +08:00
commit d3556ea9f9
1 zmienionych plików z 15 dodań i 11 usunięć

Wyświetl plik

@ -488,11 +488,11 @@ class MeshService : Service(), Logging {
/**
* Return the nodeinfo for the local node, or null if not found
*/
private val localNodeInfo get(): NodeInfo? =
private val localNodeInfo
get(): NodeInfo? =
try {
toNodeInfo(myNodeNum)
}
catch(ex: Exception) {
} catch (ex: Exception) {
null
}
@ -542,7 +542,11 @@ class MeshService : Service(), Logging {
}
/// A helper function that makes it easy to update node info objects
private fun updateNodeInfo(nodeNum: Int, withBroadcast: Boolean = true, updateFn: (NodeInfo) -> Unit) {
private fun updateNodeInfo(
nodeNum: Int,
withBroadcast: Boolean = true,
updateFn: (NodeInfo) -> Unit
) {
val info = getOrCreateNodeInfo(nodeNum)
updateFn(info)