Commit 4f01acf5 authored by gergely-ujvari's avatar gergely-ujvari

Add workaround for real-time updates to extend the annotations list if needed

The rootScope.annotations was not refreshed when a new real-time annotation arrived, so for comments and document view we have to insert the annotation there manually

Fixes #1149
parent 6987d3c5
......@@ -468,6 +468,14 @@ class App
$scope.$apply =>
if annotator.plugins.Store?
annotator.plugins.Store._onLoadAnnotations data
# XXX: Ugly workaround to update the scope content
switch $rootScope.viewState.view
when 'Document'
unless annotator.isComment(annotation)
$rootScope.annotations.push annotation
when 'Comments'
if annotator.isComment(annotation)
$rootScope.annotations.push annotation
when 'update'
$scope.markAnnotationUpdate data
annotator.plugins.Store._onLoadAnnotations data
......
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