From 42d829737cdf7bdafe1ef4c4b7846fbedbf1102b Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Sat, 25 Apr 2026 22:12:59 +0200 Subject: [PATCH] fix(mobile): auto-save watch directory on blur, not via Save button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Save button is anchored to the Instance section near the top. Moving the auto_import_path write to onBlur on the field itself means the value is persisted as soon as the user leaves the input — no need to scroll up and hit Save. --- mobile/app/(tabs)/settings.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mobile/app/(tabs)/settings.tsx b/mobile/app/(tabs)/settings.tsx index 16f228e..27fdef1 100644 --- a/mobile/app/(tabs)/settings.tsx +++ b/mobile/app/(tabs)/settings.tsx @@ -37,9 +37,6 @@ export default function SettingsScreen() { async function save() { await setSetting(db, 'instance_url', instanceUrl.trim()); await setSetting(db, 'handle', handle.trim()); - if (Platform.OS === 'android') { - await setSetting(db, 'auto_import_path', autoPath.trim()); - } setSaved(true); setTimeout(() => setSaved(false), 2000); } @@ -173,11 +170,12 @@ export default function SettingsScreen() { placeholder="/sdcard/FitFiles" value={autoPath} onChangeText={setAutoPath} + onBlur={() => setSetting(db, 'auto_import_path', autoPath.trim())} autoCapitalize="none" /> - New FIT files in this directory are imported automatically in the - background. Leave blank to disable. Requires storage permission. + New FIT files in this directory are imported automatically when you + open the app. Leave blank to disable. Requires storage permission. )}