Skip to content

Commit

Permalink
Remove counter in pushNotification function
Browse files Browse the repository at this point in the history
  • Loading branch information
codad5 committed Apr 2, 2024
1 parent a9ea57e commit 6d58d6e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/helpers/windowhelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export function loadContextmenu() {
}


// TODO: Remove the counter
let notificationCount = 0;
export function pushNotification(options: string | Options) {
isPermissionGranted().then((granted) => {
if (!granted) {
Expand All @@ -36,10 +34,7 @@ export function pushNotification(options: string | Options) {
});
}
console.log("permission granted");
if (typeof options === 'object') options.body = `${options.body} ${notificationCount}`;
if (typeof options === 'string') options = `${options} ${notificationCount}`;
sendNotification(options);
notificationCount++;
});
}

Expand Down

0 comments on commit 6d58d6e

Please sign in to comment.