mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
move admin messages to nodes tab
This commit is contained in:
parent
a60013e2dd
commit
b401c8bac3
9 changed files with 189 additions and 116 deletions
|
|
@ -55,9 +55,6 @@ class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging {
|
|||
binding.lsSleepView.isEnabled = connected && model.config.power.isPowerSaving
|
||||
binding.positionBroadcastSwitch.isEnabled = connected
|
||||
binding.lsSleepSwitch.isEnabled = connected && model.isESP32()
|
||||
binding.shutdownButton.isEnabled = connected && model.hasAXP()
|
||||
binding.rebootButton.isEnabled = connected
|
||||
binding.factoryResetButton.isEnabled = connected
|
||||
}
|
||||
|
||||
binding.positionBroadcastPeriodEditText.on(EditorInfo.IME_ACTION_DONE) {
|
||||
|
|
@ -111,41 +108,5 @@ class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging {
|
|||
debug("User changed isPowerSaving to $isChecked")
|
||||
}
|
||||
}
|
||||
|
||||
binding.shutdownButton.setOnClickListener {
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage("${getString(R.string.shutdown)}?")
|
||||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
}
|
||||
.setPositiveButton(getString(R.string.okay)) { _, _ ->
|
||||
debug("User clicked requestShutdown")
|
||||
model.requestShutdown()
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
binding.rebootButton.setOnClickListener {
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage("${getString(R.string.reboot)}?")
|
||||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
}
|
||||
.setPositiveButton(getString(R.string.okay)) { _, _ ->
|
||||
debug("User clicked requestReboot")
|
||||
model.requestReboot()
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
binding.factoryResetButton.setOnClickListener {
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle(R.string.are_you_sure_factory_reset)
|
||||
.setMessage(R.string.factory_reset_description)
|
||||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
}
|
||||
.setPositiveButton(R.string.okay) { _, _ ->
|
||||
model.requestFactoryReset()
|
||||
}
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue