kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix(config): admin requests confirmation handling
rodzic
f941d32758
commit
89a3171b58
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue