fix #14740: language picker follows a language set elsewhere

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-18 11:44:28 +01:00
co-authored by Claude Opus 5.5
parent 9e53d0b390
commit 24cebd7e71
2 changed files with 12 additions and 6 deletions
+6 -2
View File
@@ -112,8 +112,12 @@
try { try {
const next = await getCall(id) const next = await getCall(id)
if (request === detailRequest && id === selectedId) { if (request === detailRequest && id === selectedId) {
// A refresh of the same call keeps what the user picked. // A refresh of the same call keeps what the user picked, unless the
if (next.call.id !== detail?.call.id) language = next.language // backend's suggestion changed (e.g. it was transcribed from the
// prompt in another language and failed).
if (next.call.id !== detail?.call.id || next.language !== detail?.language) {
language = next.language
}
detail = next detail = next
detailError = '' detailError = ''
} }
+6 -4
View File
@@ -19,10 +19,12 @@
let language = $state('de') let language = $state('de')
function show(next: PendingPrompt | null) { function show(next: PendingPrompt | null) {
// A refresh of the same call keeps what the user picked. if (next?.id !== brief?.id) error = ''
if (next?.id !== brief?.id) { // A refresh of the same call keeps what the user picked, unless the
error = '' // backend's suggestion changed (e.g. a transcription started from the
if (next) language = next.language // main window in another language).
if (next && (next.id !== brief?.id || next.language !== brief?.language)) {
language = next.language
} }
brief = next brief = next
} }