diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index 5008e5378..8c7874846 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -542,9 +542,11 @@ class App.Controller extends Spine.Controller @html App.view('generic/error/unauthorized')(data) metaTaskUpdate: -> + delay = App.TaskManager.renderDelay() + return if !delay App.Delay.set( -> App.Event.trigger 'task:render' - App.TaskManager.renderDelay() + delay 'meta-task-update' ) diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.coffee index 5e80dfec6..0151b8878 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.coffee @@ -496,10 +496,17 @@ class _taskManagerSingleton extends App.Controller 'task' ) - # set new renderDelayTime + # handle init task rendering at loading time, prevent multible, not needed dom operations + @initTaskRenderInterval = App.Interval.set( + -> + App.Event.trigger('task:render') + 1200 + ) App.Delay.set( => + App.Interval.clear(@initTaskRenderInterval) @renderDelayTime = 20 + App.Event.trigger('task:render') task_count * 450 )