address comments

pull/2825/head
kevdliu 2023-06-14 19:17:57 -04:00
parent e1330880f2
commit ffe6a65134
4 changed files with 8 additions and 29 deletions

View File

@ -189,13 +189,7 @@
render_1();
}
};
var buzz_1 = function (length, strength) {
if (length === void 0) { length = undefined; }
if (strength === void 0) { strength = undefined; }
if (!config_1.disableVibration) {
Bangle.buzz(length, strength);
}
};
var buzz_1 = config_1.disableVibration ? function () { } : Bangle.buzz;
Bangle.loadWidgets();
Bangle.drawWidgets();
Bangle.setUI({

View File

@ -255,12 +255,7 @@
/**
* Vibrate the watch if vibration is enabled
*/
let buzz = (length: number | undefined = undefined, strength: number | undefined = undefined) => {
if (!config.disableVibration) {
Bangle.buzz(length, strength);
}
}
let buzz = config.disableVibration ? () => {} : Bangle.buzz;
Bangle.loadWidgets();
Bangle.drawWidgets();

View File

@ -23,7 +23,6 @@
var appInfo = storage.readJSON(app_1 + '.info', false);
menu[appInfo.name] = {
value: config.hidden.includes(app_1),
format: function (value) { return (value ? 'Yes' : 'No'); },
onchange: eval("(value) => { onchange(value, \"".concat(app_1, "\"); }"))
};
}
@ -180,16 +179,14 @@
}
},
'Show clocks': {
value: config.showClocks,
format: function (value) { return (value ? 'Yes' : 'No'); },
value: !!config.showClocks,
onchange: function (value) {
config.showClocks = value;
changed = true;
}
},
'Show launchers': {
value: config.showLaunchers,
format: function (value) { return (value ? 'Yes' : 'No'); },
value: !!config.showLaunchers,
onchange: function (value) {
config.showLaunchers = value;
changed = true;
@ -197,7 +194,6 @@
},
'Disable vibration': {
value: !!config.disableVibration,
format: function (value) { return (value ? 'Yes' : 'No'); },
onchange: function (value) {
config.disableVibration = value;
changed = true;
@ -220,7 +216,6 @@
},
'Show icons?': {
value: config.display.icon,
format: function (value) { return (value ? 'Yes' : 'No'); },
onchange: function (value) {
config.display.icon = value;
changed = true;

View File

@ -27,7 +27,6 @@
let appInfo = storage.readJSON(app + '.info', false) as AppInfo;
menu[appInfo.name] = {
value: config.hidden.includes(app),
format: (value: boolean) => (value ? 'Yes' : 'No'),
onchange: eval(`(value) => { onchange(value, "${app}"); }`)
}
}
@ -196,24 +195,21 @@
}
},
'Show clocks': {
value: config.showClocks,
format: value => (value ? 'Yes' : 'No'),
onchange: value => {
value: !!config.showClocks,
onchange: (value: boolean) => {
config.showClocks = value;
changed = true;
}
},
'Show launchers': {
value: config.showLaunchers,
format: value => (value ? 'Yes' : 'No'),
onchange: value => {
value: !!config.showLaunchers,
onchange: (value: boolean) => {
config.showLaunchers = value;
changed = true;
}
},
'Disable vibration': {
value: !!config.disableVibration,
format: (value: boolean) => (value ? 'Yes' : 'No'),
onchange: (value: boolean) => {
config.disableVibration = value;
changed = true;
@ -236,7 +232,6 @@
},
'Show icons?': {
value: config.display.icon,
format: value => (value ? 'Yes' : 'No'),
onchange: value => {
config.display.icon = value;
changed = true;