0.04: Fix 'Uncaught ReferenceError: "__FILE__" is not defined' error (fix #2326)

pull/2333/head
Gordon Williams 2022-11-30 09:37:39 +00:00
parent f55db143be
commit 1777799ae6
3 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,4 @@
0.01: Initial creation of "Swipe back to the Clock" App. Let's you swipe from left to right on any app to return back to the clock face.
0.02: Fix deleting from white and black lists.
0.03: Adapt to availability of Bangle.showClock and Bangle.load
0.04: Fix 'Uncaught ReferenceError: "__FILE__" is not defined' error (fix #2326)

View File

@ -29,12 +29,13 @@
})(Bangle.load);
let swipeHandler = (dir) => {
log("swipe:" + dir + " on app: " + __FILE__);
let currentFile = global.__FILE__||"default";
log("swipe:" + dir + " on app: " + currentFile);
if (!inhibit && dir === 1 && !Bangle.CLOCK && __FILE__ != ".bootcde") {
log("on a not clock app " + __FILE__);
if ((settings.mode === 1 && settings.whiteList.includes(__FILE__)) || // "White List"
(settings.mode === 2 && !settings.blackList.includes(__FILE__)) || // "Black List"
if (!inhibit && dir === 1 && !Bangle.CLOCK) {
log("on a not clock app " + currentFile);
if ((settings.mode === 1 && settings.whiteList.includes(currentFile)) || // "White List"
(settings.mode === 2 && !settings.blackList.includes(currentFile)) || // "Black List"
settings.mode === 3) { // "Always"
log("load clock");
Bangle.showClock();

View File

@ -2,7 +2,7 @@
"id": "swp2clk",
"name": "Swipe back to the Clock",
"shortName": "Swipe to Clock",
"version": "0.03",
"version": "0.04",
"description": "Let's you swipe from left to right on any app to return back to the clock face. Please configure in the settings app after installing to activate, since its disabled by default.",
"icon": "app.png",
"type": "bootloader",