added folder select dialog, fixed chat loading

This commit is contained in:
2026-03-29 13:01:26 +02:00
parent 5c8d11824e
commit 94691f12ab
2 changed files with 44 additions and 9 deletions
+30 -1
View File
@@ -115,6 +115,35 @@ const SettingsScreen: React.FC = () => {
Alert.alert('Gespeichert', `Neuer Speicherort:\n${clean}\n\nWird ab der naechsten Nachricht verwendet.`);
}, []);
const storagePaths = [
{ label: 'App-intern (Standard)', path: DEFAULT_STORAGE_PATH },
{ label: 'Externer Speicher', path: '/storage/emulated/0/ARIA/attachments' },
{ label: 'SD-Karte', path: '/storage/sdcard1/ARIA/attachments' },
{ label: 'Downloads', path: '/storage/emulated/0/Download/ARIA' },
];
const showPathPicker = useCallback(() => {
const options = storagePaths.map(p => p.label);
options.push('Eigenen Pfad eingeben');
options.push('Abbrechen');
Alert.alert(
'Speicherort waehlen',
'Wo sollen Anhaenge gespeichert werden?',
[
...storagePaths.map(p => ({
text: p.label,
onPress: () => saveStoragePath(p.path),
})),
{
text: 'Eigenen Pfad eingeben',
onPress: () => { setTempPath(storagePath); setEditingPath(true); },
},
{ text: 'Abbrechen', style: 'cancel' as const },
],
);
}, [storagePath]);
const clearStorageCache = useCallback(async () => {
Alert.alert(
'Cache loeschen',
@@ -438,7 +467,7 @@ const SettingsScreen: React.FC = () => {
<View style={{flexDirection: 'row', gap: 8, marginTop: 8}}>
<TouchableOpacity
style={[styles.clearButton, {flex: 1, marginTop: 0}]}
onPress={() => { setTempPath(storagePath); setEditingPath(true); }}
onPress={showPathPicker}
>
<Text style={styles.clearButtonText}>Pfad aendern</Text>
</TouchableOpacity>