Просмотр исходного кода

Remove periodic polling of document for labels

Shane Kilkelly 9 лет назад
Родитель
Сommit
a363b62f23
1 измененных файлов с 1 добавлено и 14 удалено
  1. 1 14
      services/web/public/coffee/ide/labels/LabelsManager.coffee

+ 1 - 14
services/web/public/coffee/ide/labels/LabelsManager.coffee

@@ -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
 			)