mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Remove periodic polling of document for labels
This commit is contained in:
parent
d0bf407515
commit
a363b62f23
1 changed files with 1 additions and 14 deletions
|
@ -1,8 +1,6 @@
|
|||
define [
|
||||
], () ->
|
||||
|
||||
AUTOMATIC_REFRESH_PERIOD = 1000 * 60 * 10
|
||||
|
||||
class LabelsManager
|
||||
constructor: (@ide, @$scope) ->
|
||||
@$scope.$root._labels = this
|
||||
|
@ -11,26 +9,15 @@ define [
|
|||
documents: {} # map of DocId => List[Label]
|
||||
|
||||
@loadLabelsTimeout = null
|
||||
@periodicLoadInterval = null
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
# set up a regular re-load
|
||||
setTimeout(
|
||||
() =>
|
||||
@periodicLoadInterval = setInterval(
|
||||
() =>
|
||||
@loadLabelsFromOpenDoc()
|
||||
, AUTOMATIC_REFRESH_PERIOD
|
||||
)
|
||||
, AUTOMATIC_REFRESH_PERIOD
|
||||
)
|
||||
# listen for document open
|
||||
@$scope.$on 'document:opened', (e, doc) =>
|
||||
setTimeout(
|
||||
() =>
|
||||
@scheduleLoadLabelsFromOpenDoc()
|
||||
, 1000
|
||||
, 0
|
||||
)
|
||||
, 0
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue