refactor(config): pass destNum via setFragmentResultListener

This commit is contained in:
andrekir 2024-04-15 17:56:47 -03:00
parent e6e85d6403
commit c15c3d8c09
8 changed files with 44 additions and 42 deletions

View file

@ -229,17 +229,6 @@ 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
}
fun generatePacketId(): Int? {
return try {
meshService?.packetId