aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornfebe <fenn25.fn@gmail.com>2024-12-06 02:48:19 +0100
committernfebe <fenn25.fn@gmail.com>2024-12-09 01:56:46 +0100
commitcc4257265bd864e14dcc716012f93f5d7f4a7abd (patch)
treeda066dd09255219f21a0a868684818051b66d851
parent6f3ee6b09a27cedf49c56b981d6d21fd852b4838 (diff)
downloadnextcloud-server-enh/no-issues/share-entry-link.tar.gz
nextcloud-server-enh/no-issues/share-entry-link.zip
fix: Delete link update code in ShareEntryLinkenh/no-issues/share-entry-link
Since Nexcloud27, all share edits can only be done from the `SharingDetailsTab` or the `QuickShareSelect` so this concerned component does not need to handle updates. Signed-off-by: nfebe <fenn25.fn@gmail.com>
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue24
1 files changed, 8 insertions, 16 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index d1ad87ec6a8..615a5e299ca 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -696,9 +696,8 @@ export default {
* accordingly
*
* @param {Share} share the new share
- * @param {boolean} [update] do we update the current share ?
*/
- async pushNewLinkShare(share, update) {
+ async pushNewLinkShare(share) {
try {
// do nothing if we're already pending creation
if (this.loading) {
@@ -728,20 +727,13 @@ export default {
this.open = false
this.shareCreationComplete = true
console.debug('Link share created', newShare)
- // if share already exists, copy link directly on next tick
- let component
- if (update) {
- component = await new Promise(resolve => {
- this.$emit('update:share', newShare, resolve)
- })
- } else {
- // adding new share to the array and copying link to clipboard
- // using promise so that we can copy link in the same click function
- // and avoid firefox copy permissions issue
- component = await new Promise(resolve => {
- this.$emit('add:share', newShare, resolve)
- })
- }
+
+ // adding new share to the array and copying link to clipboard
+ // using promise so that we can copy link in the same click function
+ // and avoid firefox copy permissions issue
+ const component = await new Promise(resolve => {
+ this.$emit('add:share', newShare, resolve)
+ })
await this.getNode()
emit('files:node:updated', this.node)