mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Pebble: fix sending config to watchfaces
This commit is contained in:
@@ -269,12 +269,6 @@ if (jsConfigFile != null) {
|
||||
Pebble.evaluate('ready', [{'type': "ready"}]); //callback object apparently needed by some watchfaces
|
||||
if(document.hasFocus() && !(getURLVariable('config') == 'true')) {
|
||||
Pebble.evaluate('showConfiguration');
|
||||
} else {
|
||||
window.onfocus = function () {
|
||||
showStep("step1");
|
||||
GBjs.gbLog("window focused!!!");
|
||||
Pebble.evaluate('showConfiguration');
|
||||
};
|
||||
}
|
||||
if (getURLVariable('config') == 'true') {
|
||||
showStep("step2");
|
||||
@@ -285,6 +279,13 @@ if (jsConfigFile != null) {
|
||||
Pebble.evaluate('webviewclosed',[t]);
|
||||
}
|
||||
} else {
|
||||
if (!document.hasFocus()) {
|
||||
window.onfocus = function () {
|
||||
showStep("step1");
|
||||
GBjs.gbLog("window focused!!!");
|
||||
Pebble.evaluate('showConfiguration');
|
||||
};
|
||||
}
|
||||
if (storedPreset === undefined) {
|
||||
var presetElements = document.getElementsByClassName("load_presets");
|
||||
for (var i = 0; i < presetElements.length; i ++) {
|
||||
|
||||
Reference in New Issue
Block a user