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:
@@ -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 = ''
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user