mirror of https://github.com/espruino/BangleApps
ha: always apply lazy icons to triggers
parent
0a097dd031
commit
3c2e6725fa
|
@ -40,6 +40,9 @@ exports.getTriggers = function(){
|
||||||
try{
|
try{
|
||||||
triggers = require("Storage").read("ha.trigger.json");
|
triggers = require("Storage").read("ha.trigger.json");
|
||||||
triggers = JSON.parse(triggers);
|
triggers = JSON.parse(triggers);
|
||||||
|
} catch(e) {
|
||||||
|
// In case there are no user triggers yet, we show the default...
|
||||||
|
}
|
||||||
|
|
||||||
// We lazy load all icons, otherwise, we have to keep
|
// We lazy load all icons, otherwise, we have to keep
|
||||||
// all the icons n times in memory which can be
|
// all the icons n times in memory which can be
|
||||||
|
@ -51,9 +54,6 @@ exports.getTriggers = function(){
|
||||||
return _getIcon(trigger);
|
return _getIcon(trigger);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch(e) {
|
|
||||||
// In case there are no user triggers yet, we show the default...
|
|
||||||
}
|
|
||||||
|
|
||||||
return triggers;
|
return triggers;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue