Handle validation where no export options are checked

This commit is contained in:
darthpaul
2021-09-21 15:29:38 +01:00
parent 27a9cf4369
commit 3cd84e42bc
24 changed files with 54 additions and 0 deletions

View File

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

View File

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

View File

@@ -56,9 +56,11 @@
<string name="messages">Messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import zpráv</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Proč aplikace vyžaduje přístup k internetu?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Eksporter beskeder</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Importer beskeder</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Hvorfor kræver appen adgang til internettet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Warum benötigt diese App Internetzugriff?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Εξαγωγή μηνυμάτων</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Εισαγωγή μηνυμάτων</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Γιατί η εφαρμογή απαιτεί πρόσβαση στο Internet;</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">¿Por qué la aplicación requiere acceso a internet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Miksi sovellus vaatii Internet-yhteyden?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export de messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import de messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Pourquoi cette application a besoin d\'un accès à internet ?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Por que o aplicativo necesita acceder a Internet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Mengapa aplikasi membutuhkan akses ke internet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Perché l\'applicazione richiede l\'accesso ad internet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">なぜアプリ使用にインターネットへのアクセスが必要なのですか?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Why does the app require access to the internet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">അപ്ലിക്കേഷന് ഇന്റർനെറ്റിലേക്ക് ആവശ്യമായി വരുന്നത് എന്തുകൊണ്ട്?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Berichten exporteren</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Berichten importeren</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Waarom heeft deze app toegang nodig tot het internet?</string>

View File

@@ -58,9 +58,11 @@
<string name="export_messages">Eksportuj wiadomości</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Importuj wiadomości</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Dlaczego aplikacja wymaga dostępu do Internetu?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Exportar mensagens</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Importar mensagens</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Porque é que a aplicação necessita de aceder à Internet?</string>

View File

@@ -58,9 +58,11 @@
<string name="export_messages">Экспорт сообщений</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Импорт сообщений</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Почему приложение требует доступ к интернету?</string>

View File

@@ -58,9 +58,11 @@
<string name="export_messages">Exportovať správy</string>
<string name="export_sms">Exportovať SMS</string>
<string name="export_mms">Exportovať MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Importovať správy</string>
<string name="import_sms">Importovať SMS</string>
<string name="import_mms">Importovať MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Prečo vyžaduje apka prístup na internet?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Uygulama neden internete erişim gerektiriyor?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Чому додаток потрубує доступу до інтернету?</string>

View File

@@ -56,9 +56,11 @@
<string name="export_messages">Export messages</string>
<string name="export_sms">Export SMS</string>
<string name="export_mms">Export MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">为什么该应用需要访问互联网?</string>

View File

@@ -59,6 +59,8 @@
<string name="import_messages">Import messages</string>
<string name="import_sms">Import SMS</string>
<string name="import_mms">Import MMS</string>
<string name="export_unchecked_error_message">Check at least one of Export SMS or Export MMS</string>
<string name="import_unchecked_error_message">Check at least one of Import SMS or Import MMS</string>
<!-- FAQ -->
<string name="faq_1_title">Why does the app require access to the internet?</string>