Debounce load US's
parent
dc23c424b0
commit
3fff575c22
|
@ -204,7 +204,7 @@ class EventsService
|
|||
subscription = {
|
||||
scope: scope,
|
||||
routingKey: routingKey,
|
||||
callback: _.debounce(callback, 500, {"leading": true, "trailing": false})
|
||||
callback: callback
|
||||
}
|
||||
|
||||
message = {
|
||||
|
|
|
@ -31,6 +31,7 @@ bindOnce = @.taiga.bindOnce
|
|||
groupBy = @.taiga.groupBy
|
||||
timeout = @.taiga.timeout
|
||||
bindMethods = @.taiga.bindMethods
|
||||
debounceLeading = @.taiga.debounceLeading
|
||||
|
||||
module = angular.module("taigaKanban")
|
||||
|
||||
|
@ -342,8 +343,8 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
|
||||
initializeSubscription: ->
|
||||
routingKey1 = "changes.project.#{@scope.projectId}.userstories"
|
||||
@events.subscribe @scope, routingKey1, (message) =>
|
||||
@.loadUserstories()
|
||||
@events.subscribe @scope, routingKey1, debounceLeading(300, (message) =>
|
||||
@.loadUserstories())
|
||||
|
||||
loadInitialData: ->
|
||||
project = @.loadProject()
|
||||
|
|
Loading…
Reference in New Issue