Commit 5cafdeaa authored by Aron Carroll's avatar Aron Carroll

Always modify the annotatorUI state

This fixes some issues where the AppController was still manipulating
the local scope and causing the UI to become out of sync.
parent 1cb6e98d
......@@ -127,8 +127,7 @@ class AppController
$scope.clearSelection = ->
$scope.search.query = ''
$scope.selectedAnnotations = null
$scope.selectedAnnotationsCount = 0
annotationUI.clearSelectedAnnotations()
$scope.dialog = visible: false
......@@ -141,8 +140,7 @@ class AppController
update: (query) ->
unless angular.equals $location.search()['q'], query
$location.search('q', query or null)
delete $scope.selectedAnnotations
delete $scope.selectedAnnotationsCount
annotationUI.clearSelectedAnnotations()
$scope.sort = name: 'Location'
$scope.threading = threading
......@@ -241,8 +239,8 @@ class ViewerController
params: annotation.$$tag
$scope.shouldShowThread = (container) ->
if $scope.selectedAnnotations? and not container.parent.parent
$scope.selectedAnnotations[container.message?.id]
if annotationUI.hasSelectedAnnotations() and not container.parent.parent
annotationUI.isAnnotationSelected(container.message?.id)
else
true
......
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