Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a7bfd9f50 | |||
| 5410371b9c |
@@ -79,8 +79,8 @@ android {
|
||||
applicationId "com.ariacockpit"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 20001
|
||||
versionName "0.2.0.1"
|
||||
versionCode 20002
|
||||
versionName "0.2.0.2"
|
||||
// Fallback fuer Libraries mit Product Flavors
|
||||
missingDimensionStrategy 'react-native-camera', 'general'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aria-cockpit",
|
||||
"version": "0.2.0.1",
|
||||
"version": "0.2.0.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
|
||||
@@ -1060,6 +1060,17 @@ const ChatScreen: React.FC = () => {
|
||||
if (sender === 'stt') {
|
||||
const sttText = (message.payload.text as string) || '';
|
||||
const sttAudioReqId = (message.payload.audioRequestId as string) || '';
|
||||
// Autoritative Projekt-Zuordnung vom Server (Voice-Router). Die App
|
||||
// hatte die lokale Bubble optimistisch mit dem App-Focus getaggt;
|
||||
// wenn der Router anders entschieden hat (Sticky, \u201Efuer X:"-Prefix,
|
||||
// oder Fallback), uebernehmen wir hier den Server-Wert \u2014 sonst
|
||||
// divergieren App- und Diagnostic-Ansicht (Frage im einen Kontext,
|
||||
// Antwort im anderen). Nur uebernehmen wenn das Feld mitgeliefert
|
||||
// wurde (leer/undefined = altes Bridge-Format \u2192 App-Focus behalten).
|
||||
const hasServerPid = typeof (message.payload as any).projectId === 'string';
|
||||
const sttProjectId = ((message.payload as any).projectId as string) || '';
|
||||
const applyPid = (m: ChatMessage): ChatMessage =>
|
||||
hasServerPid ? { ...m, projectId: sttProjectId } : m;
|
||||
if (!sttText) {
|
||||
return;
|
||||
}
|
||||
@@ -1072,7 +1083,7 @@ const ChatScreen: React.FC = () => {
|
||||
const idxById = prev.findIndex(m => m.audioRequestId === sttAudioReqId);
|
||||
if (idxById >= 0) {
|
||||
const next = prev.slice();
|
||||
next[idxById] = { ...next[idxById], text: newText };
|
||||
next[idxById] = applyPid({ ...next[idxById], text: newText });
|
||||
return next;
|
||||
}
|
||||
}
|
||||
@@ -1083,7 +1094,7 @@ const ChatScreen: React.FC = () => {
|
||||
);
|
||||
if (idx >= 0) {
|
||||
const next = prev.slice();
|
||||
next[idx] = { ...next[idx], text: newText };
|
||||
next[idx] = applyPid({ ...next[idx], text: newText });
|
||||
return next;
|
||||
}
|
||||
// Letzter Fallback: gar keine Placeholder \u2192 neue Bubble einfuegen
|
||||
@@ -1093,6 +1104,7 @@ const ChatScreen: React.FC = () => {
|
||||
text: newText,
|
||||
timestamp: message.timestamp,
|
||||
attachments: [{ type: 'audio', name: 'Sprachaufnahme' }],
|
||||
projectId: hasServerPid ? sttProjectId : focusedProjectIdRef.current,
|
||||
}]);
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user