Skip to content

Commit 2e53ca4

Browse files
committed
fix: remove other shares from ui when deleted
Remove the share entry in question when unsharing a folder from within the `others with access` section of a file within that folder. Using the code from the ShareList view here as well. Just copying the code here as this is a bugfix that will need to be backported. Signed-off-by: Max <max@nextcloud.com>
1 parent ae9d9a2 commit 2e53ca4

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

apps/files_sharing/src/views/SharingInherited.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
<SharingEntryInherited v-for="share in shares"
4242
:key="share.id"
4343
:file-info="fileInfo"
44-
:share="share" />
44+
:share="share"
45+
@remove:share="removeShare" />
4546
</ul>
4647
</template>
4748

@@ -152,6 +153,16 @@ export default {
152153
this.showInheritedShares = false
153154
this.shares = []
154155
},
156+
/**
157+
* Remove a share from the shares list
158+
*
159+
* @param {Share} share the share to remove
160+
*/
161+
removeShare(share) {
162+
const index = this.shares.findIndex(item => item === share)
163+
// eslint-disable-next-line vue/no-mutating-props
164+
this.shares.splice(index, 1)
165+
},
155166
},
156167
}
157168
</script>

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)