fix: remove constructor from DeviceSettingsFragment

This commit is contained in:
andrekir 2023-09-11 21:26:42 -03:00
parent e20e66b7f7
commit b93098cbce
4 changed files with 27 additions and 6 deletions

View file

@ -183,6 +183,17 @@ class UIViewModel @Inject constructor(
.filterValues { it.data.waypoint!!.expire > System.currentTimeMillis() / 1000 }
}.asLiveData()
private val _destNode = MutableStateFlow<NodeInfo?>(null)
val destNode: StateFlow<NodeInfo?> get() = if (_destNode.value != null) _destNode else _ourNodeInfo
/**
* Sets the destination [NodeInfo] used in Radio Configuration.
* @param node Destination [NodeInfo] (or null for our local NodeInfo).
*/
fun setDestNode(node: NodeInfo?) {
_destNode.value = node
}
/**
* Called immediately after activity observes packetResponse
*/