diff --git a/apps/drained/app.ts b/apps/drained/app.ts index 9fc2665ee..22e173b46 100644 --- a/apps/drained/app.ts +++ b/apps/drained/app.ts @@ -112,16 +112,14 @@ function drainedRestore() { // "public", to allow users to call load(); // necessary after updating boot.0 } -if(disableBoot){ - const checkCharge = () => { - if(E.getBattery() < restore) return; - drainedRestore(); - }; +const checkCharge = () => { + if(E.getBattery() < restore) return; + drainedRestore(); +}; - if (Bangle.isCharging()) - checkCharge(); +if (Bangle.isCharging()) + checkCharge(); - Bangle.on("charging", charging => { - if(charging) checkCharge(); - }); -} +Bangle.on("charging", charging => { + if(charging) checkCharge(); +});