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:
Davide Scaini
2026-04-25 20:39:55 +02:00
parent 2e520137ac
commit a796bf8cae
5 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import { Tabs } from 'expo-router';
import { useTheme } from '@/theme';
import { useTheme } from '@/ThemeContext';
export default function TabLayout() {
const theme = useTheme();
+1 -1
View File
@@ -6,7 +6,7 @@ import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { insertActivity } from '@/db/queries';
import { PyodideWebView } from '@/extraction/PyodideWebView';
import { extractFile } from '@/extraction/extractActivity';
import { useTheme } from '@/theme';
import { useTheme } from '@/ThemeContext';
const FIT_EXTENSIONS = ['.fit', '.fit.gz'];
const OTHER_EXTENSIONS = ['.gpx', '.tcx', '.gpx.gz', '.tcx.gz'];
+1 -1
View File
@@ -5,7 +5,7 @@ import { useCallback, useState } from 'react';
import { Alert, FlatList, Pressable, RefreshControl, StyleSheet, Text, View } from 'react-native';
import { deleteActivities, useActivities, type ActivitySummary } from '@/db/queries';
import { syncFeed } from '@/db/sync';
import { useTheme } from '@/theme';
import { useTheme } from '@/ThemeContext';
export default function FeedScreen() {
const db = useSQLiteContext();