Commit fdbd4277 authored by Robert Knight's avatar Robert Knight

Refresh the view model when a new highlight is saved

When a new highlight is saved, updateViewModel() was called
immediately after making the request to the server to save
the highlight, but not after the response from the server
is received, when additional properties such as the last-updated
timestamp for the highlight, will have been set.
parent 37e2407a
......@@ -417,6 +417,7 @@ function AnnotationController(
domainModel.permissions = permissions.private();
domainModel.$create().then(function() {
$rootScope.$emit('annotationCreated', domainModel);
updateViewModel($scope, time, domainModel, vm, permissions);
});
} else {
// User isn't logged in, save to drafts.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment