Merge pull request #2046 from overleaf/hb-detect-changes-pre-export
Do one compile on toggle to autocompile GitOrigin-RevId: 21776835c691bec9a1f80a7c0d4e651cc8c59dac
This commit is contained in:
committed by
sharelatex
parent
83495f4559
commit
523b5b2114
@@ -131,7 +131,11 @@ define([
|
|||||||
|
|
||||||
let autoCompileInterval = null
|
let autoCompileInterval = null
|
||||||
const autoCompileIfReady = function() {
|
const autoCompileIfReady = function() {
|
||||||
if ($scope.pdf.compiling || !$scope.autocompile_enabled) {
|
if (
|
||||||
|
$scope.pdf.compiling ||
|
||||||
|
!$scope.autocompile_enabled ||
|
||||||
|
!$scope.pdf.uncompiled
|
||||||
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +254,7 @@ define([
|
|||||||
$scope.$watch('autocompile_enabled', function(newValue, oldValue) {
|
$scope.$watch('autocompile_enabled', function(newValue, oldValue) {
|
||||||
if (newValue != null && oldValue !== newValue) {
|
if (newValue != null && oldValue !== newValue) {
|
||||||
if (newValue === true) {
|
if (newValue === true) {
|
||||||
startTryingAutoCompile()
|
autoCompileIfReady()
|
||||||
}
|
}
|
||||||
localStorage(`autocompile_enabled:${$scope.project_id}`, newValue)
|
localStorage(`autocompile_enabled:${$scope.project_id}`, newValue)
|
||||||
return event_tracking.sendMB('autocompile-setting-changed', {
|
return event_tracking.sendMB('autocompile-setting-changed', {
|
||||||
|
|||||||
Reference in New Issue
Block a user