refactor: remove warning_default_psk string

This commit is contained in:
andrekir 2024-03-26 08:04:44 -03:00
parent ab7f09fc8a
commit 464f787b24
27 changed files with 10 additions and 46 deletions

View file

@ -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) }