fix(mobile): watch-folder button visibility + Karoo file picker crash

- useFocusEffect re-reads auto_import_path from DB every time the Import
  tab is focused, so the scan button appears immediately after saving in
  Settings (was broken by conditional hook call which violated Rules of
  Hooks and never re-fired on setting changes)
- Nested inner try/catch isolates DocumentPicker.getDocumentAsync so
  ActivityNotFoundException (Karoo has no DocumentsUI) shows a friendly
  message instead of crashing the tab
- Settings watch-directory placeholder updated to /sdcard/FitFiles
This commit is contained in:
Davide Scaini
2026-04-25 22:08:32 +02:00
parent 44a70f4c18
commit e062ef5837
2 changed files with 49 additions and 25 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ export default function SettingsScreen() {
<Section title="Auto-import (Android)">
<Field
label="Watch directory"
placeholder="/sdcard/Karoo/Rides"
placeholder="/sdcard/FitFiles"
value={autoPath}
onChangeText={setAutoPath}
autoCapitalize="none"