diff --git a/src/__mocks__/mock-state.ts b/src/__mocks__/mock-state.ts index 91043e1a9..accdabd5b 100644 --- a/src/__mocks__/mock-state.ts +++ b/src/__mocks__/mock-state.ts @@ -16,7 +16,6 @@ export const mockSettings: SettingsState = { participating: false, playSound: true, showNotifications: true, - markOnClick: false, openAtStartup: false, appearance: Appearance.SYSTEM, colors: false, diff --git a/src/components/NotificationRow.test.tsx b/src/components/NotificationRow.test.tsx index e9bfe16a6..cb66ae0ca 100644 --- a/src/components/NotificationRow.test.tsx +++ b/src/components/NotificationRow.test.tsx @@ -41,7 +41,7 @@ describe('components/Notification.js', () => { const { getByRole } = render( { expect(shell.openExternal).toHaveBeenCalledTimes(1); }); - it('should open a notification in browser & mark it as read', () => { - const markNotification = jest.fn(); - - const props = { - notification: mockedSingleNotification, - hostname: 'github.com', - }; - - const { getByRole } = render( - - - , - ); - - fireEvent.click(getByRole('main')); - expect(shell.openExternal).toHaveBeenCalledTimes(1); - expect(markNotification).toHaveBeenCalledTimes(1); - }); - it('should mark a notification as read', () => { const markNotification = jest.fn(); @@ -90,7 +65,7 @@ describe('components/Notification.js', () => { const { getByTitle } = render( diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index 07f533f81..612a3bbb6 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -25,10 +25,6 @@ export const NotificationRow: React.FC = ({ const pressTitle = useCallback(() => { openBrowser(); - - if (settings.markOnClick) { - markNotification(notification.id, hostname); - } }, [settings]); const openBrowser = useCallback( diff --git a/src/components/Sidebar.test.tsx b/src/components/Sidebar.test.tsx index 94c5bf878..6582f917c 100644 --- a/src/components/Sidebar.test.tsx +++ b/src/components/Sidebar.test.tsx @@ -35,7 +35,7 @@ describe('components/Sidebar.tsx', () => { const tree = TestRenderer.create( diff --git a/src/context/App.test.tsx b/src/context/App.test.tsx index 05e00520c..d0b45e637 100644 --- a/src/context/App.test.tsx +++ b/src/context/App.test.tsx @@ -259,7 +259,6 @@ describe('context/App.tsx', () => { { enterpriseAccounts: [], token: null, user: null }, { appearance: 'SYSTEM', - markOnClick: false, openAtStartup: false, participating: true, playSound: true, @@ -297,7 +296,6 @@ describe('context/App.tsx', () => { { enterpriseAccounts: [], token: null, user: null }, { appearance: 'SYSTEM', - markOnClick: false, openAtStartup: true, participating: false, playSound: true, diff --git a/src/context/App.tsx b/src/context/App.tsx index 34543cf38..60197bca5 100644 --- a/src/context/App.tsx +++ b/src/context/App.tsx @@ -34,7 +34,6 @@ export const defaultSettings: SettingsState = { participating: false, playSound: true, showNotifications: true, - markOnClick: false, openAtStartup: false, appearance: Appearance.SYSTEM, colors: false, diff --git a/src/routes/Settings.test.tsx b/src/routes/Settings.test.tsx index 46d31292a..d82baf908 100644 --- a/src/routes/Settings.test.tsx +++ b/src/routes/Settings.test.tsx @@ -182,34 +182,6 @@ describe('routes/Settings.tsx', () => { expect(updateSetting).toHaveBeenCalledWith('showNotifications', false); }); - it('should toggle the onClickMarkAsRead checkbox', async () => { - let getByLabelText; - - await act(async () => { - const { getByLabelText: getByLabelTextLocal } = render( - - - - - , - ); - getByLabelText = getByLabelTextLocal; - }); - - fireEvent.click(getByLabelText('Mark as read on click'), { - target: { checked: true }, - }); - - expect(updateSetting).toHaveBeenCalledTimes(1); - expect(updateSetting).toHaveBeenCalledWith('markOnClick', false); - }); - it('should toggle the openAtStartup checkbox', async () => { let getByLabelText; diff --git a/src/routes/Settings.tsx b/src/routes/Settings.tsx index 1e38762a0..433c0e4e4 100644 --- a/src/routes/Settings.tsx +++ b/src/routes/Settings.tsx @@ -139,12 +139,6 @@ export const SettingsRoute: React.FC = () => { updateSetting('showNotifications', evt.target.checked) } /> - updateSetting('markOnClick', evt.target.checked)} - /> {!isLinux && ( -
-
- -
-
- -
-
diff --git a/src/types.ts b/src/types.ts index d3e881b9e..8aac5134c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -10,7 +10,6 @@ export interface SettingsState { participating: boolean; playSound: boolean; showNotifications: boolean; - markOnClick: boolean; openAtStartup: boolean; appearance: Appearance; colors: boolean;