diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-09-15 16:27:59 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-09-15 16:30:59 +0000 |
commit | ef5bb420f2ad6aeebca64509b640488fc87505f1 (patch) | |
tree | 8b3936fdf823e1934157364714b5c737464fe97f /apps | |
parent | d32e03ddacd7e09c8145243b35aa4f26a9daa57a (diff) | |
download | nextcloud-server-ef5bb420f2ad6aeebca64509b640488fc87505f1.tar.gz nextcloud-server-ef5bb420f2ad6aeebca64509b640488fc87505f1.zip |
Consider link shares in removeShare method in SharingTab
Currently, the `removeShare` method in the `SharingTab` view,
does not take into account `linkShares`.
Since link shares now shares thesame detail view with other share types,
it should therefore be considered hence this commit.
Resolves : https://github.com/nextcloud/server/issues/40396
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/views/SharingTab.vue | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index 0d5c1734548..f37f2095a90 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -356,9 +356,16 @@ export default { * @param {Share} share the share to remove */ removeShare(share) { - const index = this.shares.findIndex(item => item.id === share.id) - // eslint-disable-next-line vue/no-mutating-props - this.shares.splice(index, 1) + // Get reference for this.linkShares or this.shares + const shareList + = share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL + || share.type === this.SHARE_TYPES.SHARE_TYPE_LINK + ? this.linkShares + : this.shares + const index = shareList.findIndex(item => item.id === share.id) + if (index !== -1) { + shareList.splice(index, 1) + } }, /** * Await for next tick and render after the list updated |