Skip to content

Commit 0310488

Browse files
committed
Merge branch 'main' into feat/error-page-actions
2 parents fae3efb + 57fc2f5 commit 0310488

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/renderer/hooks/useNotifications.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
markNotificationThreadAsDone,
1515
markNotificationThreadAsRead,
1616
} from '../utils/api/client';
17+
import { getAccountUUID } from '../utils/auth/utils';
1718
import {
1819
areAllAccountErrorsSame,
1920
doesAllAccountsHaveErrors,
@@ -83,8 +84,9 @@ export const useNotifications = (): NotificationsState => {
8384
async (account: Account) => {
8485
setStatus('loading');
8586

87+
const accountUUID = getAccountUUID(account);
8688
const updatedNotifications = notifications.filter(
87-
(notification) => notification.account !== account,
89+
(notification) => getAccountUUID(notification.account) !== accountUUID,
8890
);
8991

9092
setNotifications(updatedNotifications);

src/renderer/utils/auth/utils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('renderer/utils/auth/utils.ts', () => {
6767

6868
beforeEach(() => {
6969
// Mock OAUTH_DEVICE_FLOW_CLIENT_ID value
70-
Constants.OAUTH_DEVICE_FLOW_CLIENT_ID = 'mock-oauth-client-id' as ClientID;
70+
Constants.OAUTH_DEVICE_FLOW_CLIENT_ID = 'FAKE_CLIENT_ID_123' as ClientID;
7171
});
7272

7373
afterEach(() => {
@@ -432,7 +432,7 @@ describe('renderer/utils/auth/utils.ts', () => {
432432
method: 'GitHub App',
433433
} as Account),
434434
).toBe(
435-
'https://github.com/settings/connections/applications/mock-oauth-client-id',
435+
'https://github.com/settings/connections/applications/FAKE_CLIENT_ID_123',
436436
);
437437

438438
expect(

0 commit comments

Comments
 (0)