More cleanup

This commit is contained in:
kolaente 2021-07-28 18:02:07 +02:00
parent 110e2aaf37
commit 0639b3bdba
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 0 additions and 19 deletions

View File

@ -1,18 +0,0 @@
export const applyDrag = (arr, dragResult) => {
const {removedIndex, addedIndex, payload} = dragResult
if (removedIndex === null && addedIndex === null) return arr
const result = [...arr]
// The payload comes from the task itself
let itemToAdd = payload
if (removedIndex !== null) {
itemToAdd = result.splice(removedIndex, 1)[0]
}
if (addedIndex !== null) {
result.splice(addedIndex, 0, itemToAdd)
}
return result
}

View File

@ -209,7 +209,6 @@
import BucketModel from '../../../models/bucket'
import {filterObject} from '@/helpers/filterObject'
import {applyDrag} from '@/helpers/applyDrag'
import {mapState} from 'vuex'
import {saveListView} from '@/helpers/saveListView'
import Rights from '../../../models/rights.json'