From 4808333f406f7764ebb166655ee62976cabb796c Mon Sep 17 00:00:00 2001 From: Alan Ai Date: Mon, 21 Dec 2020 01:40:09 +0800 Subject: [PATCH] Fix issue #963 --- opentasks/src/main/java/org/dmfs/tasks/EditTaskFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentasks/src/main/java/org/dmfs/tasks/EditTaskFragment.java b/opentasks/src/main/java/org/dmfs/tasks/EditTaskFragment.java index 07d31711f..5338d4691 100644 --- a/opentasks/src/main/java/org/dmfs/tasks/EditTaskFragment.java +++ b/opentasks/src/main/java/org/dmfs/tasks/EditTaskFragment.java @@ -682,7 +682,7 @@ public void saveAndExit() if (mValues.isInsert() || mValues.isUpdate()) { - if (TextUtils.isEmpty(TaskFieldAdapters.TITLE.get(mValues))) + if (TextUtils.isEmpty(TaskFieldAdapters.TITLE.get(mValues)) || TaskFieldAdapters.TITLE.get(mValues).trim().equals("")) { // there is no title, try to set one from the description or check list @@ -718,7 +718,7 @@ public void saveAndExit() } } - if (!TextUtils.isEmpty(TaskFieldAdapters.TITLE.get(mValues)) || mValues.isUpdate()) + if ((!TextUtils.isEmpty(TaskFieldAdapters.TITLE.get(mValues)) && !TaskFieldAdapters.TITLE.get(mValues).trim().equals("")) || mValues.isUpdate()) { if (mValues.isInsert()) {