Merge branch 'tusooa/extra-notifications' into 'develop'

Extra notifications

See merge request pleroma/pleroma-fe!1853
This commit is contained in:
HJ 2023-10-31 11:29:04 +00:00
commit 954d03150f
12 changed files with 274 additions and 8 deletions

View file

@ -124,3 +124,17 @@ export const prepareNotificationObject = (notification, i18n) => {
return notifObj
}
export const countExtraNotifications = (store) => {
const mergedConfig = store.getters.mergedConfig
if (!mergedConfig.showExtraNotifications) {
return 0
}
return [
mergedConfig.showChatsInExtraNotifications ? store.getters.unreadChatCount : 0,
mergedConfig.showAnnouncementsInExtraNotifications ? store.getters.unreadAnnouncementCount : 0,
mergedConfig.showFollowRequestsInExtraNotifications ? store.getters.followRequestCount : 0
].reduce((a, c) => a + c, 0)
}