Commit b7886650 authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Kushal Pandya

Remove removeissue logic to from list model

parent 3a51227b
......@@ -201,16 +201,7 @@ class List {
}
removeIssue(removeIssue) {
this.issues = this.issues.filter(issue => {
const matchesRemove = removeIssue.id === issue.id;
if (matchesRemove) {
this.issuesSize -= 1;
issue.removeLabel(this.label);
}
return !matchesRemove;
});
return boardsStore.removeListIssues(this, removeIssue);
}
getTypeInfo(type) {
......
......@@ -243,6 +243,19 @@ const boardsStore = {
}
},
removeListIssues(list, removeIssue) {
list.issues = list.issues.filter(issue => {
const matchesRemove = removeIssue.id === issue.id;
if (matchesRemove) {
list.issuesSize -= 1;
issue.removeLabel(list.label);
}
return !matchesRemove;
});
},
startMoving(list, issue) {
Object.assign(this.moving, { list, issue });
},
......
---
title: Remove removeIssue logic from list model
merge_request:
author: nuwe1
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment