Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-09-02 12:04:39 +0300
committerJoas Schilling <coding@schilljs.com>2020-09-02 12:04:39 +0300
commit43be6096a1b19afb737882d390e0673e7895ca6e (patch)
tree1f71af0d42c2fd720779c0b04f2c543d9dfcdaa1
parentba5403535af20f467594632e5f12b3ef16a6a659 (diff)
Trigger a proper event-bus eventbugfix/noid/proper-event-bus
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--src/Components/Action.vue16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Components/Action.vue b/src/Components/Action.vue
index b8e5146..69462cf 100644
--- a/src/Components/Action.vue
+++ b/src/Components/Action.vue
@@ -9,6 +9,7 @@
</template>
<script>
+import { emit } from '@nextcloud/event-bus'
import axios from '@nextcloud/axios'
export default {
name: 'Action',
@@ -55,16 +56,13 @@ export default {
this.$parent._$el.fadeOut(OC.menuSpeed)
this.$parent.$emit('remove')
try {
- $('body').trigger(new $.Event('OCA.Notification.Action', {
- notification: this.$parent,
- action: {
- url: this.link,
- type: type,
- },
- }))
- // do not do anything but log, the action went fine
- // only the event bus listener failed, this is not our problem
+ emit('notifications:action', {
+ notification: this.$parent._props,
+ action: this._props,
+ })
} catch (error) {
+ // do not do anything but log, the action went fine
+ // only the event bus listener failed, this is not our problem
console.error(error)
}
} catch (error) {