From 5fbfe14cb9cb5bb17abc880604bee7e5316bd968 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 9 Nov 2025 17:00:58 -0500 Subject: [PATCH] fix(sidebar): unread count Signed-off-by: Adam Setch --- src/renderer/components/Sidebar.tsx | 4 ++-- src/renderer/context/App.tsx | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/Sidebar.tsx b/src/renderer/components/Sidebar.tsx index e5373fa43..22e75a5d4 100644 --- a/src/renderer/components/Sidebar.tsx +++ b/src/renderer/components/Sidebar.tsx @@ -35,7 +35,7 @@ export const Sidebar: FC = () => { status, settings, auth, - unreadCount, + unreadNotificationCount, hasUnreadNotifications, } = useContext(AppContext); @@ -92,7 +92,7 @@ export const Sidebar: FC = () => { openGitHubNotifications(primaryAccountHostname)} size="small" diff --git a/src/renderer/context/App.tsx b/src/renderer/context/App.tsx index 46895bf96..3e08f5d98 100644 --- a/src/renderer/context/App.tsx +++ b/src/renderer/context/App.tsx @@ -77,12 +77,13 @@ interface AppContextState { globalError: GitifyError; notifications: AccountNotifications[]; - unreadCount: number; - hasUnreadNotifications: boolean; + notificationCount: number; + unreadNotificationCount: number; hasNotifications: boolean; + hasUnreadNotifications: boolean; + fetchNotifications: () => Promise; removeAccountNotifications: (account: Account) => Promise; - markNotificationsAsRead: (notifications: Notification[]) => Promise; markNotificationsAsDone: (notifications: Notification[]) => Promise; unsubscribeNotification: (notification: Notification) => Promise; @@ -375,8 +376,8 @@ export const AppProvider = ({ children }: { children: ReactNode }) => { unreadNotificationCount, hasNotifications, hasUnreadNotifications, - fetchNotifications: fetchNotificationsWithAccounts, + fetchNotifications: fetchNotificationsWithAccounts, markNotificationsAsRead: markNotificationsAsReadWithAccounts, markNotificationsAsDone: markNotificationsAsDoneWithAccounts, unsubscribeNotification: unsubscribeNotificationWithAccounts, @@ -403,6 +404,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => { unreadNotificationCount, hasNotifications, hasUnreadNotifications, + fetchNotificationsWithAccounts, markNotificationsAsReadWithAccounts, markNotificationsAsDoneWithAccounts,