Fix resetting list rights after updating the list

This commit is contained in:
kolaente 2021-01-09 15:09:26 +01:00
parent 36f5f0eabc
commit 7d40b29ae8
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -103,6 +103,12 @@ export const store = new Vuex.Store({
} }
} }
// Server updates don't return the right. Therefore the right is reset after updating the list which is
// confusing because all the buttons will disappear in that case. To prevent this, we're keeping the right
// when updating the list in global state.
if(typeof state.currentList.maxRight !== 'undefined') {
currentList.maxRight = state.currentList.maxRight
}
state.currentList = currentList state.currentList = currentList
}, },
[HAS_TASKS](state, hasTasks) { [HAS_TASKS](state, hasTasks) {