rename isAutoCompile and isBackgroundAutoCompile

changed to isAutoCompileOnLoad and isAutoCompileOnChange
This commit is contained in:
Brian Gough 2017-10-09 15:18:55 +01:00
parent 2723537f82
commit 15e2deed73

View file

@ -68,7 +68,7 @@ define [
$scope.$on "project:joined", () -> $scope.$on "project:joined", () ->
return if !autoCompile return if !autoCompile
autoCompile = false autoCompile = false
$scope.recompile(isAutoCompile: true) $scope.recompile(isAutoCompileOnLoad: true)
$scope.hasPremiumCompile = $scope.project.features.compileGroup == "priority" $scope.hasPremiumCompile = $scope.project.features.compileGroup == "priority"
$scope.$on "pdf:error:display", () -> $scope.$on "pdf:error:display", () ->
@ -86,7 +86,7 @@ define [
if isTimeNonMonotonic || timeSinceLastCompile >= AUTO_COMPILE_TIMEOUT if isTimeNonMonotonic || timeSinceLastCompile >= AUTO_COMPILE_TIMEOUT
if (!ide.$scope.hasLintingError) if (!ide.$scope.hasLintingError)
$scope.recompile(isBackgroundAutoCompile: true) $scope.recompile(isAutoCompileOnChange: true)
else else
# Extend remainder of timeout # Extend remainder of timeout
autoCompileTimeout = setTimeout () -> autoCompileTimeout = setTimeout () ->
@ -127,7 +127,7 @@ define [
sendCompileRequest = (options = {}) -> sendCompileRequest = (options = {}) ->
url = "/project/#{$scope.project_id}/compile" url = "/project/#{$scope.project_id}/compile"
params = {} params = {}
if options.isAutoCompile or options.isBackgroundAutoCompile if options.isAutoCompileOnLoad or options.isAutoCompileOnChange
params["auto_compile"]=true params["auto_compile"]=true
# if the previous run was a check, clear the error logs # if the previous run was a check, clear the error logs
$scope.pdf.logEntries = [] if $scope.check $scope.pdf.logEntries = [] if $scope.check
@ -207,7 +207,7 @@ define [
$scope.shouldShowLogs = true $scope.shouldShowLogs = true
fetchLogs(fileByPath) fetchLogs(fileByPath)
else if response.status == "autocompile-backoff" else if response.status == "autocompile-backoff"
if $scope.pdf.isAutoCompile # initial autocompile if $scope.pdf.isAutoCompileOnLoad # initial autocompile
$scope.pdf.view = 'uncompiled' $scope.pdf.view = 'uncompiled'
else # background autocompile from typing else # background autocompile from typing
$scope.pdf.view = 'errors' $scope.pdf.view = 'errors'
@ -422,7 +422,7 @@ define [
event_tracking.sendMBSampled "editor-recompile-sampled", options event_tracking.sendMBSampled "editor-recompile-sampled", options
$scope.pdf.compiling = true $scope.pdf.compiling = true
$scope.pdf.isAutoCompile = options?.isAutoCompile # initial autocompile $scope.pdf.isAutoCompileOnLoad = options?.isAutoCompileOnLoad # initial autocompile
if options?.force if options?.force
# for forced compile, turn off validation check and ignore errors # for forced compile, turn off validation check and ignore errors