diff --git a/apps.json b/apps.json index cd499116c..1ea8bb4e7 100644 --- a/apps.json +++ b/apps.json @@ -80,7 +80,7 @@ "name": "Notifications (default)", "shortName":"Notifications", "icon": "notify.png", - "version":"0.07", + "version":"0.08", "description": "A handler for displaying notifications that displays them in a bar at the top of the screen", "tags": "widget", "type": "notify", @@ -93,7 +93,7 @@ "name": "Fullscreen Notifications", "shortName":"Notifications", "icon": "notify.png", - "version":"0.07", + "version":"0.08", "description": "A handler for displaying notifications that displays them fullscreen. This may not fully restore the screen after on some apps. See `Notifications (default)` for more information about the notifications library.", "tags": "widget", "type": "notify", diff --git a/apps/notify/ChangeLog b/apps/notify/ChangeLog index 6450ca2c6..2b7a4f990 100644 --- a/apps/notify/ChangeLog +++ b/apps/notify/ChangeLog @@ -4,3 +4,4 @@ 0.05: Adjust position of notification src text 0.06: Support background color 0.07: Auto-calculate height, and pad text down even when there's no title (so it stays on-screen) +0.08: Don't turn on screen during Quiet Mode diff --git a/apps/notify/README.md b/apps/notify/README.md index ee1bf9be0..11c493102 100644 --- a/apps/notify/README.md +++ b/apps/notify/README.md @@ -9,7 +9,7 @@ other applications or widgets to display messages. ```JS options = { - on : bool, // turn screen on, default true + on : bool, // turn screen on, default true (But not if Quiet Mode is enabled) size : int, // height of notification, default is fit to height (80 max) title : string, // optional title id // optional notification ID, used with hide() diff --git a/apps/notify/notify.js b/apps/notify/notify.js index 1373fc2bd..b5ef32d8b 100644 --- a/apps/notify/notify.js +++ b/apps/notify/notify.js @@ -127,7 +127,9 @@ exports.show = function(options) { options.render({x:x, y:y, w:w, h:h}); } - if (options.on) Bangle.setLCDPower(1); // light up + if (options.on && !(require('Storage').readJSON('setting.json',1)||{}).quiet) { + Bangle.setLCDPower(1); // light up + } Bangle.setLCDMode(oldMode); // clears cliprect function anim() { diff --git a/apps/notifyfs/ChangeLog b/apps/notifyfs/ChangeLog index d4ea69cc8..974e138f7 100644 --- a/apps/notifyfs/ChangeLog +++ b/apps/notifyfs/ChangeLog @@ -5,3 +5,4 @@ 0.05: Fix `g` corruption issue if .hide gets called twice 0.06: Adjust position of notification src text and notifications without title 0.07: Support background color +0.08: Don't turn on screen during Quiet Mode diff --git a/apps/notifyfs/notify.js b/apps/notifyfs/notify.js index 0b73ad2d2..07801cedb 100644 --- a/apps/notifyfs/notify.js +++ b/apps/notifyfs/notify.js @@ -90,8 +90,9 @@ exports.show = function(options) { const area={x:x, y:y, w:w, h:h} options.render(area); } - - if (options.on) Bangle.setLCDPower(1); // light up + if (options.on && !(require('Storage').readJSON('setting.json',1)||{}).quiet) { + Bangle.setLCDPower(1); // light up + } Bangle.on("touch", exports.hide); // Create a fake graphics to hide draw attempts oldg = g; @@ -115,9 +116,11 @@ exports.hide = function(options) { Bangle.removeListener("touch", exports.hide); g.clear(); Bangle.drawWidgets(); - // flipping the screen off then on often triggers a redraw - it may not! - Bangle.setLCDPower(0); - Bangle.setLCDPower(1); + if (Bangle.isLCDOn() || !(require('Storage').readJSON('setting.json',1)||{}).quiet) { + // flipping the screen off then on often triggers a redraw - it may not! + Bangle.setLCDPower(0); + Bangle.setLCDPower(1); + } // hack for E.showMenu/showAlert/showPrompt - can force a redraw by faking next/back if (Bangle.btnWatches) { global["\xff"].watches[Bangle.btnWatches[0]].callback();