Move reports module to store

This commit is contained in:
Sean King 2023-04-06 17:59:12 -06:00
commit ad7d47f440
No known key found for this signature in database
GPG key ID: 510C52BACD6E7257
8 changed files with 64 additions and 74 deletions

View file

@ -18,6 +18,7 @@ import {
maybeShowNotification
} from '../services/notification_utils/notification_utils.js'
import apiService from '../services/api/api.service.js'
import { useReportsStore } from '../stores/reports.js'
const emptyTl = (userId = 0) => ({
statuses: [],
@ -341,7 +342,7 @@ const addNewNotifications = (state, { dispatch, notifications, older, visibleNot
}
if (notification.type === 'pleroma:report') {
dispatch('addReport', notification.report)
useReportsStore().addReport(notification.report)
}
if (notification.type === 'pleroma:emoji_reaction') {