From 6669aaeb541483d73c63b54f12221b255f377084 Mon Sep 17 00:00:00 2001 From: Jamie Weavis Date: Fri, 24 Mar 2023 19:51:12 +0000 Subject: [PATCH] feat: add streak count to notification and only show if streaking Closes #263 --- src/main/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/main.ts b/src/main/main.ts index db76546..8c4c5ec 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -167,10 +167,10 @@ const triggerReminderNotification = async (): Promise => { 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(); } };