handling received channel URLs now works okayish

This commit is contained in:
geeksville 2020-04-09 17:06:41 -07:00
parent 2b588ac7e7
commit eba6fef9fa
3 changed files with 46 additions and 7 deletions

View file

@ -130,12 +130,12 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
).show() */
MaterialAlertDialogBuilder(requireContext())
.setTitle("Change channel")
.setMessage("Are you sure you want to change the channel? All communication with other nodes will stop until you share the new channel settings.")
.setNeutralButton("Cancel") { _, _ ->
.setTitle(R.string.change_channel)
.setMessage(R.string.are_you_sure_channel)
.setNeutralButton(R.string.cancel) { _, _ ->
setGUIfromModel()
}
.setPositiveButton("Accept") { _, _ ->
.setPositiveButton(getString(R.string.accept)) { _, _ ->
// Generate a new channel with only the changes the user can change in the GUI
UIViewModel.getChannel(model.radioConfig.value)?.let { old ->
val newSettings = old.settings.toBuilder()