From a21df189fda867c7ae6c7f93605b26a074f29b01 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Thu, 30 Jul 2020 10:44:02 -0500 Subject: [PATCH] Don't allow empty account name --- .../org/tasks/caldav/BaseCaldavAccountSettingsActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/tasks/caldav/BaseCaldavAccountSettingsActivity.kt b/app/src/main/java/org/tasks/caldav/BaseCaldavAccountSettingsActivity.kt index dcb1bc6c7..2b4e7c95b 100644 --- a/app/src/main/java/org/tasks/caldav/BaseCaldavAccountSettingsActivity.kt +++ b/app/src/main/java/org/tasks/caldav/BaseCaldavAccountSettingsActivity.kt @@ -179,6 +179,10 @@ abstract class BaseCaldavAccountSettingsActivity : ThemedInjectingAppCompatActiv val url = newURL val password = newPassword var failed = false + if (newName.isBlank()) { + binding!!.nameLayout.error = getString(R.string.name_cannot_be_empty) + failed = true + } if (isNullOrEmpty(url)) { binding!!.urlLayout.error = getString(R.string.url_required) failed = true