From d23954a3f7c35b07ba139f292c54b7a747fc3a9c Mon Sep 17 00:00:00 2001 From: Richard de Boer Date: Tue, 23 Mar 2021 19:54:25 +0100 Subject: [PATCH] widancs: respect Quiet Mode --- apps.json | 2 +- apps/widancs/ChangeLog | 3 +-- apps/widancs/ancs.js | 6 ++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps.json b/apps.json index d76ae83e0..21a1eea0a 100644 --- a/apps.json +++ b/apps.json @@ -2225,7 +2225,7 @@ "name": "Apple Notification Widget", "shortName":"ANCS Widget", "icon": "widget.png", - "version":"0.06", + "version":"0.07", "description": "Displays call, message etc notifications from a paired iPhone. Read README before installation as it only works with compatible apps", "readme": "README.md", "tags": "widget", diff --git a/apps/widancs/ChangeLog b/apps/widancs/ChangeLog index 7844830d1..471507736 100644 --- a/apps/widancs/ChangeLog +++ b/apps/widancs/ChangeLog @@ -4,5 +4,4 @@ 0.04: Works on both standard and modified firmware 0.05: Bug fixes w.r.t. reconnection 0.06: Update README - Release version - - +0.07: Respect Quiet Mode diff --git a/apps/widancs/ancs.js b/apps/widancs/ancs.js index 84a79fbf9..50720cd23 100644 --- a/apps/widancs/ancs.js +++ b/apps/widancs/ancs.js @@ -187,9 +187,11 @@ //we may already be displaying a prompt, so clear it E.showPrompt(); if (screentimeout) clearTimeout(screentimeout); - Bangle.setLCDPower(true); + if (!(require('Storage').readJSON('setting.json',1)||{}).quiet) { + Bangle.setLCDPower(true); + } SCREENACCESS.request(); - if (!buzzing){ + if (!buzzing && !(require('Storage').readJSON('setting.json',1)||{}).quiet){ buzzing=true; Bangle.buzz(500).then(()=>{buzzing=false;}); }