mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: remove warning_default_psk string
This commit is contained in:
parent
ab7f09fc8a
commit
464f787b24
27 changed files with 10 additions and 46 deletions
|
|
@ -240,27 +240,17 @@ fun ChannelScreen(
|
|||
}
|
||||
|
||||
fun sendButton() {
|
||||
primaryChannel?.let { primaryChannel ->
|
||||
val message = buildString {
|
||||
append(context.getString(R.string.are_you_sure_channel))
|
||||
if (primaryChannel.settings == Channel.default.settings) {
|
||||
append("\n\n")
|
||||
append(context.getString(R.string.warning_default_psk, primaryChannel.name))
|
||||
}
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.change_channel)
|
||||
.setMessage(R.string.are_you_sure_channel)
|
||||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
showChannelEditor = false
|
||||
channelSet = channels
|
||||
}
|
||||
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.change_channel)
|
||||
.setMessage(message)
|
||||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
showChannelEditor = false
|
||||
channelSet = channels
|
||||
}
|
||||
.setPositiveButton(R.string.accept) { _, _ ->
|
||||
installSettings(channelSet)
|
||||
}
|
||||
.show()
|
||||
}
|
||||
.setPositiveButton(R.string.accept) { _, _ ->
|
||||
installSettings(channelSet)
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
var showEditChannelDialog: Int? by remember { mutableStateOf(null) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue