-
Nick Stenning authored
Brand new annotations (and page notes) are currently displayed as editor widgets in the sidebar alongside all the existing annotation cards. This means they need to be sortable. Sorting by location isn't a problem, because the annotation already carries the document location information by the time it gets to `addAnnotations`, but sorting by the updated date is, because currently the `created` and `updated` fields are only provided when the server sends back the saved annotation. This commit changes that by adding temporary `created` and `updated` timestamps to new annotations (those without an ID). These will be ignored entirely by the server, and overwritten when the annotation is saved. If for whatever reason `addAnnotations` is called with a new annotation that already has these fields, they will not be overwritten. Fixes (the rest of) #96.
3b8ea633