Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove unused auth param #1200

Merged
merged 1 commit into from
Jun 10, 2024
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
8 changes: 3 additions & 5 deletions src/utils/notifications.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ describe('utils/notifications.ts', () => {
jest.spyOn(helpers, 'openInBrowser');

const nativeNotification: Notification =
notificationsHelpers.raiseNativeNotification(
[mockGitHubNotifications[0]],
mockAuth,
);
notificationsHelpers.raiseNativeNotification([
mockGitHubNotifications[0],
]);
nativeNotification.onclick(null);

expect(helpers.openInBrowser).toHaveBeenCalledTimes(1);
Expand All @@ -131,7 +130,6 @@ describe('utils/notifications.ts', () => {
it('should click on a native notification (with more than 1 notification)', () => {
const nativeNotification = notificationsHelpers.raiseNativeNotification(
mockGitHubNotifications,
mockAuth,
);
nativeNotification.onclick(null);

Expand Down
8 changes: 2 additions & 6 deletions src/utils/notifications.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ipcRenderer } from 'electron';
import type {
AccountNotifications,
AuthState,
GitifyState,
SettingsState,
} from '../types';
Expand Down Expand Up @@ -66,14 +65,11 @@ export const triggerNativeNotifications = (
}

if (state.settings.showNotifications) {
raiseNativeNotification(diffNotifications, state.auth);
raiseNativeNotification(diffNotifications);
}
};

export const raiseNativeNotification = (
notifications: Notification[],
auth: AuthState,
) => {
export const raiseNativeNotification = (notifications: Notification[]) => {
let title: string;
let body: string;

Expand Down