mirror of https://github.com/nextcloud/bookmarks
Fix MOVE_FOLDER UX: Run mutation before manipulating data
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
c2375a00f6
commit
5b4c46f521
|
@ -757,9 +757,9 @@ export default {
|
|||
if (folderId === folder.id) {
|
||||
throw new Error('Cannot move folder into itself')
|
||||
}
|
||||
commit(mutations.MOVE_FOLDER, { folder: folder.id, target: folderId })
|
||||
const oldParent = folder.parent_folder
|
||||
folder.parent_folder = folderId
|
||||
commit(mutations.MOVE_FOLDER, { folder: folder.id, target: folderId })
|
||||
await dispatch(actions.SAVE_FOLDER, folder.id) // reloads children order for new parent
|
||||
dispatch(
|
||||
actions.LOAD_FOLDER_CHILDREN_ORDER,
|
||||
|
|
Loading…
Reference in New Issue