mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-26 14:57:38 +03:00
Avoid overwriting title for new notes
This commit is contained in:
parent
9f9d7e2660
commit
3be495ef8a
1 changed files with 2 additions and 1 deletions
|
@ -546,7 +546,8 @@ public class NotesDatabase extends AbstractNotesDatabase {
|
|||
if (newTitle != null) {
|
||||
title = newTitle;
|
||||
} else {
|
||||
if (oldNote.getRemoteId() == 0 || localAccount.getPreferredApiVersion() == null || localAccount.getPreferredApiVersion().compareTo(new ApiVersion("1.0", 0, 0)) < 0) {
|
||||
if ((oldNote.getRemoteId() == 0 || localAccount.getPreferredApiVersion() == null || localAccount.getPreferredApiVersion().compareTo(new ApiVersion("1.0", 0, 0)) < 0) &&
|
||||
(oldNote.getTitle().equals(NoteUtil.generateNonEmptyNoteTitle("", getContext())))) {
|
||||
title = NoteUtil.generateNonEmptyNoteTitle(newContent, getContext());
|
||||
} else {
|
||||
title = oldNote.getTitle();
|
||||
|
|
Loading…
Reference in a new issue