diff --git a/src/module/NotificationCenter/NotificationCenter.ts b/src/module/NotificationCenter/NotificationCenter.ts index f0b1beb..57a309d 100644 --- a/src/module/NotificationCenter/NotificationCenter.ts +++ b/src/module/NotificationCenter/NotificationCenter.ts @@ -1,6 +1,6 @@ import template from "../../../assets/template/notificationCenter.html?raw"; import templateEntry from "../../../assets/template/notificationEntry.html?raw"; -import { ModuleSetting, PoweruserModule } from "@/types"; +import { ModuleSetting, PoweruserModule, UserInbox } from "@/types"; import Utils, { loadStyle } from "@/Utils"; import style from "./notificationCenter.less?inline"; import Settings from "@/core/Settings/Settings"; @@ -86,7 +86,8 @@ export default class NotificationCenter implements PoweruserModule { messages: 0, comments: 0, follows: 0, - }); + digests: 0 + } as UserInbox); if (unreadMessages <= 0) { let elem = document.createElement("li"); diff --git a/src/types.d.ts b/src/types.d.ts index 70f7f63..a6a9405 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -135,17 +135,20 @@ export type GlobalPr0Config = { HEADER_HEIGHT: number; } +export type UserInbox = { + comments: number; + mentions: number; + messages: number; + notifications: number; + follows: number; + digests: number; +} + export type UserSyncEvent = { type: "userSync"; data: { score: number; - inbox: { - comments: number; - mentions: number; - messages: number; - notifications: number; - follows: number; - } + inbox: UserInbox; } };