Skip to content

Commit

Permalink
Merge pull request #1657 from nextcloud/fix-visually-removing-first-n…
Browse files Browse the repository at this point in the history
…otification-when-executing-an-action

Fix (visually) removing first notification when executing an action
  • Loading branch information
nickvergessen authored Sep 18, 2023
2 parents bd64523 + c587c09 commit fe9589d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/notifications-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/notifications-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/Components/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default {
default: false,
required: true,
},
notificationIndex: {
type: Number,
required: true,
},
},
data() {
Expand Down Expand Up @@ -118,7 +122,7 @@ export default {
// emit event to current app
this.$parent._$el.fadeOut(OC.menuSpeed)
this.$parent.$emit('remove')
this.$parent.$emit('remove', this.notificationIndex)
emit('notifications:action:executed', event)
Expand Down
5 changes: 4 additions & 1 deletion src/Components/Notification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
</div>

<div v-if="actions.length" class="notification-actions">
<Action v-for="(a, i) in actions" :key="i" v-bind="a" />
<Action v-for="(a, i) in actions"
:key="i"
v-bind="a"
:notification-index="index" />
</div>
<div v-else-if="externalLink" class="notification-actions">
<NcButton type="primary"
Expand Down

0 comments on commit fe9589d

Please sign in to comment.