Merge pull request #3364 from thyttan/clockinfo

clock_info: prepend swipe listener if possible
pull/3392/head
thyttan 2024-04-22 19:15:40 +02:00 committed by GitHub
commit ddab537ea2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -9,3 +9,4 @@
0.08: Pass options to show(), hide() and run(), and add focus() and blur() item methods
0.09: Save clkinfo settings on kill and remove
0.10: Fix focus bug when changing focus between two clock infos
0.11: Prepend swipe listener if possible

View File

@ -286,7 +286,7 @@ exports.addInteractive = function(menu, options) {
// On 2v18+ firmware we can stop other event handlers from being executed since we handled this
E.stopEventPropagation&&E.stopEventPropagation();
}
Bangle.on("swipe",swipeHandler);
if (Bangle.prependListener) {Bangle.prependListener("swipe",swipeHandler);} else {Bangle.on("swipe",swipeHandler);}
const blur = () => {
options.focus=false;
Bangle.CLKINFO_FOCUS--;

View File

@ -1,7 +1,7 @@
{ "id": "clock_info",
"name": "Clock Info Module",
"shortName": "Clock Info",
"version":"0.10",
"version":"0.11",
"description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)",
"icon": "app.png",
"type": "module",