Merge pull request #3147 from nextcloud/enhancement/hide-disabled-trash-bin

Hide the trash bin if it's disabled
This commit is contained in:
Christoph Wurst 2021-06-04 12:04:58 +02:00 committed by GitHub
commit ca662d66e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

4
package-lock.json generated
View File

@ -5930,7 +5930,7 @@
"dev": true
},
"cdav-library": {
"version": "git+https://github.com/nextcloud/cdav-library.git#00e0479f545cd9d9fc445e70596ec154c106d3c7",
"version": "git+https://github.com/nextcloud/cdav-library.git#3170b21e9dccf8b95bbc23c29927734099ba3cc0",
"from": "git+https://github.com/nextcloud/cdav-library.git",
"requires": {
"core-js": "^3.13.0",
@ -17361,4 +17361,4 @@
"dev": true
}
}
}
}

View File

@ -132,7 +132,7 @@ export default {
},
retentionDuration() {
return Math.ceil(
this.trashBin._props['{http://nextcloud.com/ns}trash-bin-retention-duration'] / (60 * 60 * 24)
this.trashBin.retentionDuration / (60 * 60 * 24)
)
},
},

View File

@ -401,7 +401,7 @@ const getters = {
},
hasTrashBin(state) {
return state.trashBin !== undefined
return state.trashBin !== undefined && state.trashBin.retentionDuration !== 0
},
trashBin(state) {