diff options
| author | Henry Jameson <me@hjkos.com> | 2023-11-16 20:41:41 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2023-11-16 20:41:41 +0200 |
| commit | a17defc5abfe60b6aa0dc3275dac2cbec507472a (patch) | |
| tree | 3f32e21fbe024c3dadbfefcb295e43d45d74784c /src/components/notifications/notifications.js | |
| parent | 6ed2cb8f436bca1e1cd4c40a0a2df0e96fb5d149 (diff) | |
handle desktop notifications clicks
Diffstat (limited to 'src/components/notifications/notifications.js')
| -rw-r--r-- | src/components/notifications/notifications.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index a1088dff..a210e19d 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -159,14 +159,16 @@ const Notifications = { updateScrollPosition () { this.showScrollTop = this.$refs.root.offsetTop < this.scrollerRef.scrollTop }, + /* "Interacted" really refers to "actionable" notifications that require user input, + * everything else (likes/repeats/reacts) cannot be acted and therefore we just clear + * the "seen" status upon any clicks on them + */ notificationClicked (notification) { - // const { type, id, seen } = notification + const { id } = notification + this.$store.dispatch('notificationClicked', { id }) }, notificationInteracted (notification) { - const { id, seen } = notification - if (!seen) this.markOneAsSeen(id) - }, - markOneAsSeen (id) { + const { id } = notification this.$store.dispatch('markSingleNotificationAsSeen', { id }) }, markAsSeen () { |
