Description
There are two main issues with upload and undo:
-
uploadStatus
attribute is changed when undoing/redoing which is incorrect, because it should be only changed on upload changes. Also, the upload is already aborted but undo/redo may change theuploadStatus
to incorrect value. -
after refactoring
RemoveOperation
,History
, OT and undo, removing of "image placeholder" can be undone, which is incorrect because that image upload is aborted when "image placeholder" is removed.
The solutions are:
uploadStatus
changes has to be done in separate, transparent batches (or, maybe even totally removed from model) so undo does not "see" them.- removing of "image placeholder" has to be done using
isPermanent
flag, in separate batch (preferably a transparent batch, but normal batch should also work as permanent remove operation is reversed toNoOperation
anyway).