Skip to content

Commit

Permalink
feat: add streak count to notification and only show if streaking
Browse files Browse the repository at this point in the history
Closes #263
  • Loading branch information
jamieweavis committed Mar 24, 2023
1 parent 9b67d14 commit 6669aae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ const triggerReminderNotification = async (): Promise<void> => {
if (!Notification.isSupported()) return;
const username = store.get('username');
const stats = await fetchStats(username);
if (stats?.contributions?.current === 0) {
if (stats?.contributions?.current === 0 && stats?.streak?.current > 0) {
new Notification({
title: "🔥 You haven't contributed today",
body: "Don't forget to contribute today to continue your streak on GitHub!",
title: `🔥 Don't lose your streak!`,
body: `Contribute today to continue your ${stats.streak.current} day streak on GitHub`,
}).show();
}
};
Expand Down

0 comments on commit 6669aae

Please sign in to comment.