added auto scroll, fixed stt for voice messages, fixed get answers in chat, hope fixed attachments

This commit is contained in:
2026-03-29 11:56:13 +02:00
parent f1f297b3a7
commit 8fb95b884f
15 changed files with 51 additions and 16 deletions
+6 -4
View File
@@ -87,7 +87,10 @@ const ChatScreen: React.FC = () => {
console.error('[Chat] Fehler beim Laden des Verlaufs:', err);
}
};
loadMessages();
loadMessages().then(() => {
// Auto-Scroll nach Laden des Verlaufs
setTimeout(() => flatListRef.current?.scrollToEnd({ animated: false }), 200);
});
}, []);
// RVS-Nachrichten abonnieren
@@ -159,7 +162,7 @@ const ChatScreen: React.FC = () => {
const userMsg: ChatMessage = {
id: nextId(),
sender: 'user',
text: '[Sprachnachricht]',
text: '🎙 Spracheingabe wird verarbeitet...',
timestamp: Date.now(),
attachments: [{ type: 'audio', name: 'Sprachaufnahme' }],
};
@@ -262,9 +265,8 @@ const ChatScreen: React.FC = () => {
const userMsg: ChatMessage = {
id: nextId(),
sender: 'user',
text: '[Sprachnachricht]',
text: '🎙 Spracheingabe wird verarbeitet...',
timestamp: Date.now(),
attachments: [{ type: 'audio', name: 'Sprachaufnahme' }],
};
setMessages(prev => [...prev, userMsg]);