From 5204fdbab2a3dce0fb90c7123cdfcf8bc1cfbc0a Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 17 Sep 2020 08:47:28 +0200 Subject: [PATCH] verifyDataFromUser() cleanup --- .../java/com/example/todoapp/fragments/SharedViewModel.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/example/todoapp/fragments/SharedViewModel.kt b/app/src/main/java/com/example/todoapp/fragments/SharedViewModel.kt index af7d9dc..e68d8ce 100644 --- a/app/src/main/java/com/example/todoapp/fragments/SharedViewModel.kt +++ b/app/src/main/java/com/example/todoapp/fragments/SharedViewModel.kt @@ -42,9 +42,7 @@ class SharedViewModel(application: Application): AndroidViewModel(application) { } fun verifyDataFromUser(title: String, description: String): Boolean { - return if(TextUtils.isEmpty(title) || TextUtils.isEmpty(description)){ - false - } else !(title.isEmpty() || description.isEmpty()) + return !(title.isEmpty() || description.isEmpty()) } fun parsePriority(priority: String): Priority {