Closed cabagge closed 5 years ago
In table attachments
is note_id = 0
Move to Beta, it contains latest fixes
I'm sorry for confusion, maybe there is some missunderstanding.... I checked the latest develop from git. It seems, the bug is in the latest source. After some research I found the bug could be fixed in dbHelper.java --> updateNote()
There is original code:
updateAttachment(note.get_id() != null ? note.get_id() : values.getAsLong(KEY_CREATION), attachment, db);
And it could be fixed with additional check for noteID = 0:
updateAttachment((note.get_id() != null && note.get_id() != 0) ? note.get_id() : values.getAsLong(KEY_CREATION), attachment, db);
With this fix is a photo attachment assigned correctly to the note. (BTW, this bug is not in current google play release 5.5.2)
Ah, again sorry for confusion, you already fixed it in Omni-Notes-Commons
.
I had an old library.
in src/main/java/it/feio/android/omninotes/commons/models/BaseNote.java
is it fixed
public Long get_id() {
return creation > 0 ? creation : null;
}
Thanks.
Note attachment - Photo not saved
steps to reproduction:
Checked in latest build alpha