mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
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:
parent
83495f4559
commit
523b5b2114
1 changed files with 6 additions and 2 deletions
|
@ -131,7 +131,11 @@ define([
|
|||
|
||||
let autoCompileInterval = null
|
||||
const autoCompileIfReady = function() {
|
||||
if ($scope.pdf.compiling || !$scope.autocompile_enabled) {
|
||||
if (
|
||||
$scope.pdf.compiling ||
|
||||
!$scope.autocompile_enabled ||
|
||||
!$scope.pdf.uncompiled
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -250,7 +254,7 @@ define([
|
|||
$scope.$watch('autocompile_enabled', function(newValue, oldValue) {
|
||||
if (newValue != null && oldValue !== newValue) {
|
||||
if (newValue === true) {
|
||||
startTryingAutoCompile()
|
||||
autoCompileIfReady()
|
||||
}
|
||||
localStorage(`autocompile_enabled:${$scope.project_id}`, newValue)
|
||||
return event_tracking.sendMB('autocompile-setting-changed', {
|
||||
|
|
Loading…
Reference in a new issue