fix: write timeseries directly when wheel's write_activity silently skips it
Diagnosed via on-device debug: build_timeseries produces 3271 points correctly, but the installed wheel's write_activity has a silent exception path that skips writing the timeseries file. The workaround calls build_timeseries directly and writes the file if missing. Also moves useTheme import to @/ThemeContext across all tab screens.
This commit is contained in:
@@ -39,6 +39,13 @@ const PY_EXTRACT = [
|
||||
'ts_path = outdir / "activities" / (act_id + ".timeseries.json")',
|
||||
'geojson_path = outdir / "activities" / (act_id + ".geojson")',
|
||||
'',
|
||||
'# write_activity in the installed wheel silently skips timeseries — write it directly.',
|
||||
'if not ts_path.exists():',
|
||||
' from bincio.extract.timeseries import build_timeseries as _bts',
|
||||
' _ts = _bts(activity.points, activity.started_at, "public")',
|
||||
' if _ts.get("t"):',
|
||||
' ts_path.write_text(json.dumps(_ts))',
|
||||
'',
|
||||
'json.dumps({',
|
||||
' "id": act_id,',
|
||||
' "detail": json.loads(detail_path.read_text()),',
|
||||
|
||||
Reference in New Issue
Block a user