aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue13
-rw-r--r--apps/files_sharing/src/views/SharingDetailsTab.vue1
2 files changed, 13 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue b/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue
index 565bee1d821..fde4f0e7091 100644
--- a/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue
+++ b/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue
@@ -29,6 +29,7 @@
<script>
import { ShareType } from '@nextcloud/sharing'
+import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import DropdownIcon from 'vue-material-design-icons/TriangleSmallDown.vue'
import SharesMixin from '../mixins/SharesMixin.js'
import ShareDetails from '../mixins/ShareDetails.js'
@@ -145,7 +146,17 @@ export default {
created() {
this.selectedOption = this.preSelectedOption
},
-
+ mounted() {
+ subscribe('update:share', (share) => {
+ if (share.id === this.share.id) {
+ this.share.permissions = share.permissions
+ this.selectedOption = this.preSelectedOption
+ }
+ })
+ },
+ unmounted() {
+ unsubscribe('update:share')
+ },
methods: {
selectOption(optionLabel) {
this.selectedOption = optionLabel
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue
index 404a8fe25e9..df420cf7af2 100644
--- a/apps/files_sharing/src/views/SharingDetailsTab.vue
+++ b/apps/files_sharing/src/views/SharingDetailsTab.vue
@@ -969,6 +969,7 @@ export default {
this.$emit('add:share', this.share)
} else {
this.$emit('update:share', this.share)
+ emit('update:share', this.share)
this.queueUpdate(...permissionsAndAttributes)
}