diff options
author | Phil Hughes <me@iamphill.com> | 2016-09-01 10:48:34 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-09-01 10:48:34 +0100 |
commit | 25c84fd629e72acc753b920a35eb3cfe1cf93035 (patch) | |
tree | 637c819e9ed700f829738b963c1215bbef41d92c /app | |
parent | 105c80b6be3ae0bb550f455d0fcb1d4fe34462b5 (diff) | |
download | gitlab-ce-25c84fd629e72acc753b920a35eb3cfe1cf93035.tar.gz |
Fixed issue where moving issue & then scrolling stop new page loadingissue-boards-issues-total-count
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/boards/models/list.js.es6 | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/app/assets/javascripts/boards/models/list.js.es6 b/app/assets/javascripts/boards/models/list.js.es6 index 296a033071e..91fd620fdb3 100644 --- a/app/assets/javascripts/boards/models/list.js.es6 +++ b/app/assets/javascripts/boards/models/list.js.es6 @@ -52,7 +52,7 @@ class List { } nextPage () { - if (Math.floor(this.issues.length / 20) === this.page) { + if (this.issuesSize > this.issues.length) { this.page++; return this.getIssues(false); @@ -94,15 +94,20 @@ class List { } addIssue (issue, listFrom) { - this.issues.push(issue); + if (!this.findIssue(issue.id)) { + this.issues.push(issue); - if (this.label) { - issue.addLabel(this.label); - } + if (this.label) { + issue.addLabel(this.label); + } - if (listFrom) { - this.issuesSize++; - gl.boardService.moveIssue(issue.id, listFrom.id, this.id); + if (listFrom) { + this.issuesSize++; + gl.boardService.moveIssue(issue.id, listFrom.id, this.id) + .then(() => { + listFrom.getIssues(false); + }); + } } } |