Improve the recording time with a monotonic clock to avoid timer drift on the RecordingViewModel view model in the Recording package target.

This commit is contained in:
2026-07-04 13:25:15 +02:00
parent 3c542ee033
commit 69e30a9947
3 changed files with 48 additions and 15 deletions
@@ -51,13 +51,7 @@ extension ContentView {
/// supported equivalent of its current value so the locale picker starts with a valid selection.
func load() async {
locales = await SpeechTranscriber.supportedLocales.sorted {
name(for: $0) < name(for: $1)
}
if let equivalent = await SpeechTranscriber.supportedLocale(
equivalentTo: locale
) {
locale = equivalent
name(for: $0).localizedStandardCompare(name(for: $1)) == .orderedAscending
}
}