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>
This commit is contained in:
fenn-cs 2023-09-15 16:27:59 +01:00 committed by nextcloud-command
parent d32e03ddac
commit ef5bb420f2
10 changed files with 20 additions and 13 deletions

View file

@ -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

3
dist/6898-6898.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/6898-6898.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/8087-8087.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/core-common.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long