Commit 7d0f99bc authored by Gergely Ujvari's avatar Gergely Ujvari

Configure updater for standalone page

An annotation standalone page should only listen to news from
the showed annotation and its replies. This has been lost in the
our series of refactoring.

Now it is restored.

Fix #1427
parent 57bd3411
......@@ -510,8 +510,8 @@ class Editor
class AnnotationViewer
this.$inject = ['$scope']
constructor: ($scope) ->
this.$inject = ['$routeParams', '$scope', 'streamfilter']
constructor: ($routeParams, $scope, streamfilter) ->
# Tells the view that these annotations are standalone
$scope.isEmbedded = false
......@@ -520,6 +520,17 @@ class AnnotationViewer
$scope.activate = angular.noop
$scope.openDetails = angular.noop
$scope.$watch 'updater', (updater) ->
if updater?
updater.then (sock) ->
filter = streamfilter
.setPastDataNone()
.setMatchPolicyIncludeAny()
.addClause('/references', 'first_of', $routeParams.id, true)
.addClause('/id', 'equals', $routeParams.id, true)
.getFilter()
sock.send(JSON.stringify({filter}))
class Viewer
this.$inject = [
......
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