From 98b555b2852ebfd2461e24ba8ff4f2b4c2db644d Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Wed, 17 Feb 2021 00:48:14 +0900
Subject: [PATCH] Use NotificationType of megalodon to handle notifications
---
.../store/TimelineSpace/Contents/Notifications.ts | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/renderer/store/TimelineSpace/Contents/Notifications.ts b/src/renderer/store/TimelineSpace/Contents/Notifications.ts
index 1200fc33..1736c497 100644
--- a/src/renderer/store/TimelineSpace/Contents/Notifications.ts
+++ b/src/renderer/store/TimelineSpace/Contents/Notifications.ts
@@ -1,4 +1,4 @@
-import generator, { Entity } from 'megalodon'
+import generator, { Entity, NotificationType } from 'megalodon'
import { Module, MutationTree, ActionTree, GetterTree } from 'vuex'
import { RootState } from '@/store'
import { MyWindow } from '~/src/types/global'
@@ -148,12 +148,13 @@ const getters: GetterTree = {
handledNotifications: state => {
return state.notifications.filter(n => {
switch (n.type) {
- case 'favourite':
- case 'follow':
- case 'follow_request':
- case 'mention':
- case 'reblog':
- case 'emoji_reaction':
+ case NotificationType.Follow:
+ case NotificationType.Favourite:
+ case NotificationType.Reblog:
+ case NotificationType.Mention:
+ case NotificationType.Poll:
+ case NotificationType.EmojiReaction:
+ case NotificationType.FollowRequest:
return true
default:
return false