mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(config): admin requests confirmation handling
This commit is contained in:
parent
f941d32758
commit
89a3171b58
1 changed files with 4 additions and 1 deletions
|
|
@ -277,7 +277,10 @@ class RadioConfigViewModel @Inject constructor(
|
|||
)
|
||||
|
||||
private fun sendAdminRequest(destNum: Int) {
|
||||
when (radioConfigState.value.route) {
|
||||
val route = radioConfigState.value.route
|
||||
_radioConfigState.update { it.copy(route = "") } // setter (response is PortNum.ROUTING_APP)
|
||||
|
||||
when (route) {
|
||||
AdminRoute.REBOOT.name -> requestReboot(destNum)
|
||||
AdminRoute.SHUTDOWN.name -> with(radioConfigState.value) {
|
||||
if (hasMetadata() && !metadata.canShutdown) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue