Skip to content

"Attachment not found": Existing image is lost if "Discard changes" is clicked after a reminder triggers #1024

Description

@XYIheng

Description:

There is a state conflict between the reminder trigger and the "Discard changes" action. If a user opens a previously saved note (which contains an image and an upcoming reminder) and waits for the reminder to trigger while the note is open, clicking "Discard changes" afterwards breaks the attachment.
When reopening the note and tapping the image, a Toast shows "Attachment not found", indicating the file or its database reference was incorrectly deleted.

steps to reproduce:

  1. create a note with image
  2. set a reminder for this note (e.g., after one minute)
  3. back to the note list
  4. enter the note again
  5. wait until the reminder reminds you
  6. click the options button in this note
  7. click "Discard changes"
  8. enter the note again
  9. Tap the image thumbnail
  10. see the error: a toast shows that "Attachment not found", and the image fails to open

Expected behavior:

It should open the image without showing the toast.

screenshot

Image

Environment:

Omninotes Version: 6.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions