Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/renderer/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Sidebar: FC = () => {
status,
settings,
auth,
unreadCount,
unreadNotificationCount,
hasUnreadNotifications,
} = useContext(AppContext);

Expand Down Expand Up @@ -92,7 +92,7 @@ export const Sidebar: FC = () => {
<IconButton
aria-label="Notifications"
data-testid="sidebar-notifications"
description={`${unreadCount} unread notifications ↗`}
description={`${unreadNotificationCount} unread notifications ↗`}
icon={BellIcon}
onClick={() => openGitHubNotifications(primaryAccountHostname)}
size="small"
Expand Down
10 changes: 6 additions & 4 deletions src/renderer/context/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ interface AppContextState {
globalError: GitifyError;

notifications: AccountNotifications[];
unreadCount: number;
hasUnreadNotifications: boolean;
notificationCount: number;
unreadNotificationCount: number;
hasNotifications: boolean;
hasUnreadNotifications: boolean;

fetchNotifications: () => Promise<void>;
removeAccountNotifications: (account: Account) => Promise<void>;

markNotificationsAsRead: (notifications: Notification[]) => Promise<void>;
markNotificationsAsDone: (notifications: Notification[]) => Promise<void>;
unsubscribeNotification: (notification: Notification) => Promise<void>;
Expand Down Expand Up @@ -375,8 +376,8 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
unreadNotificationCount,
hasNotifications,
hasUnreadNotifications,
fetchNotifications: fetchNotificationsWithAccounts,

fetchNotifications: fetchNotificationsWithAccounts,
markNotificationsAsRead: markNotificationsAsReadWithAccounts,
markNotificationsAsDone: markNotificationsAsDoneWithAccounts,
unsubscribeNotification: unsubscribeNotificationWithAccounts,
Expand All @@ -403,6 +404,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
unreadNotificationCount,
hasNotifications,
hasUnreadNotifications,

fetchNotificationsWithAccounts,
markNotificationsAsReadWithAccounts,
markNotificationsAsDoneWithAccounts,
Expand Down