Skip to content

Commit 24d4998

Browse files
committed
refactor: formatting
Signed-off-by: Adam Setch <[email protected]>
1 parent 97d8cf5 commit 24d4998

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/renderer/context/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ interface AppContextState {
8484

8585
fetchNotifications: () => Promise<void>;
8686
removeAccountNotifications: (account: Account) => Promise<void>;
87+
8788
markNotificationsAsRead: (notifications: Notification[]) => Promise<void>;
8889
markNotificationsAsDone: (notifications: Notification[]) => Promise<void>;
8990
unsubscribeNotification: (notification: Notification) => Promise<void>;
@@ -379,6 +380,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
379380

380381
fetchNotifications: fetchNotificationsWithAccounts,
381382
removeAccountNotifications,
383+
382384
markNotificationsAsRead: markNotificationsAsReadWithAccounts,
383385
markNotificationsAsDone: markNotificationsAsDoneWithAccounts,
384386
unsubscribeNotification: unsubscribeNotificationWithAccounts,
@@ -408,6 +410,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
408410

409411
fetchNotificationsWithAccounts,
410412
removeAccountNotifications,
413+
411414
markNotificationsAsReadWithAccounts,
412415
markNotificationsAsDoneWithAccounts,
413416
unsubscribeNotificationWithAccounts,

src/renderer/hooks/useNotifications.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ interface NotificationsState {
3131
globalError: GitifyError;
3232

3333
notifications: AccountNotifications[];
34+
3435
fetchNotifications: (state: GitifyState) => Promise<void>;
3536
removeAccountNotifications: (account: Account) => Promise<void>;
3637

@@ -225,6 +226,7 @@ export const useNotifications = (): NotificationsState => {
225226
globalError,
226227

227228
notifications,
229+
228230
fetchNotifications,
229231
removeAccountNotifications,
230232

src/renderer/utils/comms.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export function setKeyboardShortcut(keyboardShortcut: boolean): void {
6767
export function updateTrayColor(notificationsLength: number): void {
6868
window.gitify.tray.updateColor(notificationsLength);
6969
}
70+
7071
/**
7172
* Updates the tray icon title.
7273
*

src/renderer/utils/notifications/remove.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ describe('renderer/utils/remove.ts', () => {
6464
);
6565

6666
expect(result[0].notifications.length).toBe(1);
67+
expect(result[0].notifications[0]).toBe(
68+
mockSingleAccountNotifications[0].notifications[0],
69+
);
6770
});
6871

6972
it('should not modify notifications when account UUID does not match', () => {
@@ -74,7 +77,6 @@ describe('renderer/utils/remove.ts', () => {
7477
mockSingleAccountNotifications,
7578
);
7679

77-
// Should return unchanged
7880
expect(result[0].notifications.length).toBe(1);
7981
expect(result[0].notifications[0]).toBe(
8082
mockSingleAccountNotifications[0].notifications[0],

0 commit comments

Comments
 (0)