mirror of https://github.com/espruino/BangleApps
recorder: don't prompt the user when the columns change - force new file
parent
98e560a756
commit
f5ac8ade61
|
@ -39,4 +39,5 @@
|
|||
0.31: Ensure that background-drawn tracks can get cancelled, and draw less at a time to make updates smoother
|
||||
plotTrack now draws the current track even if you're not actively recording
|
||||
0.32: Add cadence data to output files
|
||||
0.33: Ensure that a new file is always created if the stuff that's being recorded has changed (fix #3081)
|
||||
0.33: Ensure that a new file is always created if the stuff that's being recorded has changed (fix #3081)
|
||||
0.34: Avoid prompting when creating a new file (#3081)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "recorder",
|
||||
"name": "Recorder",
|
||||
"shortName": "Recorder",
|
||||
"version": "0.33",
|
||||
"version": "0.34",
|
||||
"description": "Record GPS position, heart rate and more in the background, then download to your PC.",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,outdoors,gps,widget,clkinfo",
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
settings.file = getTrackFilename();
|
||||
}
|
||||
var headers = require("Storage").open(settings.file,"r").readLine();
|
||||
if (headers && headers.trim()==getCSVHeaders(getActiveRecorders()).join(",")){ // if file exists AND the headers match (#3081)
|
||||
if (headers){ // if file exists
|
||||
if(headers.trim()!==getCSVHeaders(getActiveRecorders()).join(",")){
|
||||
// headers don't match, reset (#3081)
|
||||
options.force = "new";
|
||||
}
|
||||
if (!options.force) { // if not forced, ask the question
|
||||
g.reset(); // work around bug in 2v17 and earlier where bg color wasn't reset
|
||||
return E.showPrompt(
|
||||
|
|
Loading…
Reference in New Issue