no swipeOn for HW=1
parent
c4cbac0898
commit
e01e08db22
|
|
@ -2,6 +2,7 @@
|
||||||
const SETTINGS_FILE = "torch.json";
|
const SETTINGS_FILE = "torch.json";
|
||||||
let settings;
|
let settings;
|
||||||
let s = require("Storage");
|
let s = require("Storage");
|
||||||
|
let wu = require("widget_utils");
|
||||||
|
|
||||||
let loadSettings = function() {
|
let loadSettings = function() {
|
||||||
settings = s.readJSON(SETTINGS_FILE,1)|| {'bg': '#FFFFFF', 'color': 'White'};
|
settings = s.readJSON(SETTINGS_FILE,1)|| {'bg': '#FFFFFF', 'color': 'White'};
|
||||||
|
|
@ -19,10 +20,10 @@
|
||||||
g.setTheme({bg:settings.bg,fg:"#000"});
|
g.setTheme({bg:settings.bg,fg:"#000"});
|
||||||
g.setColor(settings.bg);
|
g.setColor(settings.bg);
|
||||||
g.fillRect(0,0,g.getWidth(),g.getHeight());
|
g.fillRect(0,0,g.getWidth(),g.getHeight());
|
||||||
// if Fastload Utils is installed, make Torch compatible with it.
|
if (s.read('fastload.cache')!==undefined) {
|
||||||
if (s.readJSON('fastload.info') != undefined) {
|
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
require('widget_utils').swipeOn();
|
if (process.env.HWVERSION==1) wu.hide();
|
||||||
|
if (process.env.HWVERSION==2) wu.swipeOn();
|
||||||
}
|
}
|
||||||
Bangle.setUI({
|
Bangle.setUI({
|
||||||
mode : 'custom',
|
mode : 'custom',
|
||||||
|
|
@ -32,6 +33,8 @@
|
||||||
Bangle.setLCDBrightness(brightnessBackup);
|
Bangle.setLCDBrightness(brightnessBackup);
|
||||||
Bangle.setOptions(optionsBackup);
|
Bangle.setOptions(optionsBackup);
|
||||||
g.setTheme(themeBackup);
|
g.setTheme(themeBackup);
|
||||||
|
wu.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue