From b0b10592cd915c816d0d365f05eb33a636963db2 Mon Sep 17 00:00:00 2001 From: notEvil Date: Thu, 6 Apr 2023 23:51:16 +0200 Subject: [PATCH] - apps/chargent: added notification --- apps/chargent/boot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/chargent/boot.js b/apps/chargent/boot.js index c62003a21..666fd3a04 100644 --- a/apps/chargent/boot.js +++ b/apps/chargent/boot.js @@ -24,16 +24,17 @@ lim = sum / cnt; require('Storage').writeJSON('chargent.json', {limit: lim}); } + require('notify').show({id: 'chargent', title: 'Fully charged'}); // TODO ? customizable Bangle.buzz(500); setTimeout(() => Bangle.buzz(500), 1000); } - }, 30*1000); + }, 3e4); } } else { if (id) { - clearInterval(id); - id = undefined; + id = clearInterval(id); + require('notify').hide({id: 'chargent'}); } } });