Skip to content

Commit

Permalink
remove doubled excerpt generation
Browse files Browse the repository at this point in the history
  • Loading branch information
korelstar authored and stefan-niedermann committed Dec 27, 2019
1 parent 73a43e3 commit 209de35
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,11 @@ long addNote(long accountId, CloudNote note) {
}
values.put(key_status, dbNote.getStatus().getTitle());
values.put(key_account_id, dbNote.getAccountId());
values.put(key_excerpt, dbNote.getExcerpt());
} else {
values.put(key_status, DBStatus.VOID.getTitle());
values.put(key_account_id, accountId);
values.put(key_excerpt, NoteUtil.generateNoteExcerpt(note.getContent()));
}
if (note.getRemoteId() > 0) {
values.put(key_remote_id, note.getRemoteId());
Expand All @@ -335,7 +337,6 @@ long addNote(long accountId, CloudNote note) {
values.put(key_favorite, note.isFavorite());
values.put(key_category, note.getCategory());
values.put(key_etag, note.getEtag());
values.put(key_excerpt, NoteUtil.generateNoteExcerpt(note.getContent()));
return db.insert(table_notes, null, values);
}

Expand Down

0 comments on commit 209de35

Please sign in to comment.