Skip to content

Prevent pending file from being deleted before all messages have had their annotations updated #24

@rrbrambley

Description

@rrbrambley

Currently, the MessageManager and FileManager both listen for the FileUploadService.INTENT_ACTION_FILE_UPLOAD_COMPLETE broadcast to perform their own tasks.

The MessageManager modifies the annotations of all messages dependent on the file and deletes pending file attachments from the db.

The FileManager removes the pending file from the db.

It's possible that the pending file could be removed from the db right before a crash/termination, leaving the Messages in an unrecoverable state (i.e. with pending message attachments pointing to a pending file id that doesn't exist).

Fix this.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions