From 53b18e041ff0494377be8718b8a4e36749dd7722 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Wed, 7 Jun 2017 14:03:58 +0100 Subject: [PATCH] Trigger selection-related logic after accepting or rejecting changes. --- .../aceEditor/track-changes/TrackChangesManager.coffee | 4 +++- .../review-panel/controllers/ReviewPanelController.coffee | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee index 12417d2e09..59c119d929 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee @@ -210,6 +210,7 @@ define [ acceptChangeIds: (change_ids) -> @rangesTracker.removeChangeIds(change_ids) @updateAnnotations() + @updateFocus() rejectChangeIds: (change_ids) -> changes = @rangesTracker.getChanges(change_ids) @@ -288,7 +289,8 @@ define [ session.$fromReject = false else throw new Error("unknown change: #{JSON.stringify(change)}") - + @updateFocus() + removeCommentId: (comment_id) -> @rangesTracker.removeCommentId(comment_id) @updateAnnotations() diff --git a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee index 2cb12eb983..5a56baba2c 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -374,9 +374,6 @@ define [ bulkAccept = () -> _doAcceptChanges $scope.reviewPanel.selectedEntryIds.slice() - $timeout () -> - $scope.reviewPanel.selectedEntryIds = [] - $scope.reviewPanel.nVisibleSelectedChanges = 0 event_tracking.sendMB "rp-bulk-accept", { view: if $scope.ui.reviewPanelOpen then $scope.reviewPanel.subView else 'mini', nEntries: $scope.reviewPanel.nVisibleSelectedChanges @@ -384,9 +381,6 @@ define [ bulkReject = () -> _doRejectChanges $scope.reviewPanel.selectedEntryIds.slice() - $timeout () -> - $scope.reviewPanel.selectedEntryIds = [] - $scope.reviewPanel.nVisibleSelectedChanges = 0 event_tracking.sendMB "rp-bulk-reject", { view: if $scope.ui.reviewPanelOpen then $scope.reviewPanel.subView else 'mini', nEntries: $scope.reviewPanel.nVisibleSelectedChanges