Skip to content

Commit c3b6284

Browse files
author
thyttan
committed
Merge remote-tracking branch 'upstream/master' into app-loader
2 parents 3dcbab9 + e628565 commit c3b6284

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4534
-4815
lines changed

android.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<label class="chip tooltip" filterid="ram" data-tooltip="Apps that don't save anything to flash memory">Online</label>
8686
<label class="chip tooltip" filterid="clkinfo" data-tooltip="Info displayed on clocks, or clocks with info">Clock Info</label>
8787
<label class="chip tooltip" filterid="health" data-tooltip="Apps for your health">Health</label>
88+
<label class="chip tooltip" filterid="fonts" data-tooltip="Extra fonts for non-latin languages">Fonts</label>
8889
<label class="chip tooltip" filterid="favourites" data-tooltip="Apps that you've liked ❤️">Favourites</label>
8990
</div>
9091
<div class="sort-nav hidden">

apps/alarm/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@
5555
to select an alarm in the main menu.
5656
0.50: Bangle.js 2: Long touch of alarm in main menu toggle it on/off. Touching the icon on
5757
the right will do the same.
58+
0.51: Fix long-touch to enable alarm/timer not updating time (fix #3804)

apps/alarm/app.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,18 @@ function showMainMenu(scroll, group, scrollback) {
8787
};
8888
const getGroups = settings.showGroup && !group;
8989
const groups = getGroups ? {} : undefined;
90-
var showAlarm;
9190
const getIcon = (e)=>{return e.on ? (e.timer ? iconTimerOn : iconAlarmOn) : (e.timer ? iconTimerOff : iconAlarmOff);};
9291

9392
alarms.forEach((e, index) => {
94-
showAlarm = !settings.showGroup || (group ? e.group === group : !e.group);
93+
const showAlarm = !settings.showGroup || (group ? e.group === group : !e.group);
9594
if(showAlarm) {
9695
const label = trimLabel(getLabel(e),40);
9796
menu[label] = {
9897
value: e.on,
9998
onchange: (v, touch) => {
10099
if (touch && (2==touch.type || 145<touch.x)) { // Long touch or touched icon.
101100
e.on = v;
101+
if (e.on) prepareForSave(e, index);
102102
saveAndReload();
103103
} else {
104104
setTimeout(e.timer ? showEditTimerMenu : showEditAlarmMenu, 10, e, index, undefined, scroller?scroller.scroll:undefined, group);
@@ -328,6 +328,14 @@ function prepareAlarmForSave(alarm, alarmIndex, time, date, temp) {
328328
}
329329
}
330330

331+
function prepareForSave(alarm, alarmIndex) {
332+
if (alarm.timer) {
333+
prepareTimerForSave(alarm, alarmIndex, require("time_utils").decodeTime(alarm.timer));
334+
} else {
335+
prepareAlarmForSave(alarm, alarmIndex, require("time_utils").decodeTime(alarm.t));
336+
}
337+
}
338+
331339
function saveAndReload() {
332340
// Before saving revert the dow to the standard format (alarms only!)
333341
alarms.filter(e => e.timer === undefined).forEach(a => a.dow = handleFirstDayOfWeek(a.dow));
@@ -574,13 +582,7 @@ function enableAll(on) {
574582
if (confirm) {
575583
alarms.forEach((alarm, i) => {
576584
alarm.on = on;
577-
if (on) {
578-
if (alarm.timer) {
579-
prepareTimerForSave(alarm, i, require("time_utils").decodeTime(alarm.timer));
580-
} else {
581-
prepareAlarmForSave(alarm, i, require("time_utils").decodeTime(alarm.t));
582-
}
583-
}
585+
if (on) prepareForSave(alarm, i);
584586
});
585587
saveAndReload();
586588
showMainMenu();

apps/alarm/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "alarm",
33
"name": "Alarms & Timers",
44
"shortName": "Alarms",
5-
"version": "0.50",
5+
"version": "0.51",
66
"description": "Set alarms and timers on your Bangle",
77
"icon": "app.png",
88
"tags": "tool,alarm",

apps/android/ChangeLog

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
0.40: Ensure we send health 'activity' message to gadgetbridge (added 2v26)
4444
0.41: When using `actfetch`, fetch historical activity type too
4545
0.42: Add handling for android STREAM_MUSIC volume level info, emitting on
46-
arrival. (Needs Gadgetbridge nightly (either flavor) for now, or stable
46+
arrival. (Needs Gadgetbridge nightly (either flavour) for now, or stable
4747
version 85 when it's out)
48-
48+
0.43: Ensure listRecs doesn't list old-style recorded tracks (Otherwise Gadgetbridge fails parsing the filename)
49+
0.44: Pass HTTP request timeout to Gadgetbridge

apps/android/lib.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ exports.gbHandler = (event) => {
232232
},
233233
//{t:"listRecs", id:"20230616a"}
234234
"listRecs": function() {
235-
let recs = require("Storage").list(/^recorder\.log.*\.csv$/,{sf:true}).map(s => s.slice(12, 21));
236-
if (event.id.length > 2) { // Handle if there was no id supplied. Then we send a list all available recorder logs back.
235+
let recs = require("Storage").list(/^recorder\.log.*\.csv$/,{sf:true}).map(s => s.slice(12, 21)).filter(s => s.length>7 /*ignore 'old' tracks without date*/);
236+
if (event.id && event.id.length > 2) { // Handle if there was no id supplied. Then we send a list all available recorder logs back.
237237
let firstNonsyncedIdx = recs.findIndex((logId) => logId > event.id);
238238
if (-1 == firstNonsyncedIdx) {
239239
recs = []
@@ -321,6 +321,7 @@ exports.httpHandler = (url,options) => {
321321
if (options.method) req.method = options.method;
322322
if (options.body) req.body = options.body;
323323
if (options.headers) req.headers = options.headers;
324+
req.timeout = options.timeout || 30000;
324325
exports.gbSend(req);
325326
//create the promise
326327
var promise = new Promise(function(resolve,reject) {
@@ -329,7 +330,7 @@ exports.httpHandler = (url,options) => {
329330
//if after "timeoutMillisec" it still hasn't answered -> reject
330331
delete Bangle.httpRequest[options.id];
331332
reject("Timeout");
332-
},options.timeout||30000)};
333+
},req.timeout+500)};
333334
});
334335
return promise;
335336
};

apps/android/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "android",
33
"name": "Android Integration",
44
"shortName": "Android",
5-
"version": "0.42",
5+
"version": "0.44",
66
"description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.",
77
"icon": "app.png",
88
"tags": "tool,system,messages,notifications,gadgetbridge",

apps/edgeclk/ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
0.02: Fix reset of progress bars on midnight. Fix display of 100k+ steps.
33
0.03: Added option to display weather.
44
0.04: Added option to display live updates of step count.
5+
0.05: Reset graphics before initial clearing of the screen. Helps in some
6+
situations if using fastload utils.

apps/edgeclk/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
/* Startup Process
337337
------------------------------------------------------------------------------*/
338338

339-
g.clear();
339+
g.clear(1);
340340
drawAll();
341341
startTimers();
342342
registerEvents();

apps/edgeclk/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "edgeclk",
33
"name": "Edge Clock",
44
"shortName": "Edge Clock",
5-
"version": "0.04",
5+
"version": "0.05",
66
"description": "Crisp clock with perfect readability.",
77
"readme": "README.md",
88
"icon": "app.png",

0 commit comments

Comments
 (0)