- apps/chargent: added notification
parent
a33a6df463
commit
b0b10592cd
|
|
@ -24,16 +24,17 @@
|
||||||
lim = sum / cnt;
|
lim = sum / cnt;
|
||||||
require('Storage').writeJSON('chargent.json', {limit: lim});
|
require('Storage').writeJSON('chargent.json', {limit: lim});
|
||||||
}
|
}
|
||||||
|
require('notify').show({id: 'chargent', title: 'Fully charged'});
|
||||||
// TODO ? customizable
|
// TODO ? customizable
|
||||||
Bangle.buzz(500);
|
Bangle.buzz(500);
|
||||||
setTimeout(() => Bangle.buzz(500), 1000);
|
setTimeout(() => Bangle.buzz(500), 1000);
|
||||||
}
|
}
|
||||||
}, 30*1000);
|
}, 3e4);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (id) {
|
if (id) {
|
||||||
clearInterval(id);
|
id = clearInterval(id);
|
||||||
id = undefined;
|
require('notify').hide({id: 'chargent'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue