Handle validation where no export options are checked
This commit is contained in:
parent
27a9cf4369
commit
3cd84e42bc
24 changed files with 54 additions and 0 deletions
|
|
@ -57,6 +57,11 @@ class ExportMessagesDialog(
|
|||
return@setOnClickListener
|
||||
}
|
||||
|
||||
if(!view.export_sms_checkbox.isChecked && !view.export_mms_checkbox.isChecked){
|
||||
activity.toast(R.string.export_unchecked_error_message)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
config.exportSms = view.export_sms_checkbox.isChecked
|
||||
config.exportMms = view.export_mms_checkbox.isChecked
|
||||
config.lastExportPath = file.absolutePath.getParentPath()
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@ class ImportMessagesDialog(
|
|||
.create().apply {
|
||||
activity.setupDialogStuff(view, this, R.string.import_messages) {
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
if(!view.import_sms_checkbox.isChecked && !view.import_mms_checkbox.isChecked){
|
||||
activity.toast(R.string.import_unchecked_error_message)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
activity.toast(R.string.importing)
|
||||
config.importSms = view.import_sms_checkbox.isChecked
|
||||
config.importMms = view.import_mms_checkbox.isChecked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue