mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(config): pass destNum via setFragmentResultListener
This commit is contained in:
parent
e6e85d6403
commit
c15c3d8c09
8 changed files with 44 additions and 42 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue