Always show current file in mini review panel

This commit is contained in:
James Allen 2016-11-17 14:57:11 +00:00
parent df420e0d21
commit 7c3a4dfa4d

View file

@ -16,6 +16,7 @@ define [
trackNewChanges: false
hasEntries: false
subView: $scope.SubViews.CUR_FILE
openSubView: $scope.SubViews.CUR_FILE
$scope.commentState =
adding: false
@ -40,6 +41,18 @@ define [
if subView == $scope.SubViews.CUR_FILE
$scope.$broadcast "review-panel:layout"
$scope.$watch "ui.reviewPanelOpen", (open) ->
console.log "ui.reviewPanelOpen", open
return if !open?
if !open
# Always show current file when not open, but save current state
$scope.reviewPanel.openSubView = $scope.reviewPanel.subView
$scope.reviewPanel.subView = $scope.SubViews.CUR_FILE
else
# Reset back to what we had when previously open
$scope.reviewPanel.subView = $scope.reviewPanel.openSubView
changesTrackers = {}
$scope.$watch "editor.open_doc_id", (open_doc_id) ->