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