You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that if I select RESOURCES such a JSON, the list stops at the entry beforehand and then prints "Status bluetoothImageIndex: 69, undefined" (the next entry has an OFF image, but no ON image)
WatchfaceEditor.js
If you have an "Off" image without an "On" image you get an "Can't find image undefined" error.
Alarm, DND and Lock need to check for image first before trying to use, like BT does.
status: {
alarm: function () {
if ('ImageIndexOff' in wfe.coords.statalarm && !wfe.data.alarm)
t = $c(wfe.coords.statalarm.ImageIndexOff);
else if (wfe.data.alarm)
t = $c(wfe.coords.statalarm.ImageIndexOn);
else return;
t.style.left = wfe.coords.statalarm.Coordinates.X + "px";
t.style.top = wfe.coords.statalarm.Coordinates.Y + "px";
wfe.view.insert(t, "c_stat_alarm");
},
bt: function () {
if ('ImageIndexOff' in wfe.coords.statbt && !wfe.data.bluetooth)
t = $c(wfe.coords.statbt.ImageIndexOff);
else if ('ImageIndexOn' in wfe.coords.statbt && wfe.data.bluetooth)
t = $c(wfe.coords.statbt.ImageIndexOn);
else return;
t.style.left = wfe.coords.statbt.Coordinates.X + "px";
t.style.top = wfe.coords.statbt.Coordinates.Y + "px";
wfe.view.insert(t, "c_stat_bt");
},
dnd: function () {
if ('ImageIndexOff' in wfe.coords.statdnd && !wfe.data.dnd)
t = $c(wfe.coords.statdnd.ImageIndexOff);
else if (wfe.data.dnd)
t = $c(wfe.coords.statdnd.ImageIndexOn);
else return;
t.style.left = wfe.coords.statdnd.Coordinates.X + "px";
t.style.top = wfe.coords.statdnd.Coordinates.Y + "px";
wfe.view.insert(t, "c_stat_dnd");
},
lock: function () {
if ('ImageIndexOff' in wfe.coords.statlock && !wfe.data.lock)
t = $c(wfe.coords.statlock.ImageIndexOff);
else if (wfe.data.lock)
t = $c(wfe.coords.statlock.ImageIndexOn);
else return;
t.style.left = wfe.coords.statlock.Coordinates.X + "px";
t.style.top = wfe.coords.statlock.Coordinates.Y + "px";
wfe.view.insert(t, "c_stat_lock");
}
},
The text was updated successfully, but these errors were encountered: