Restore translated note rendering

Changelog-Fixed: Fixed broken automatic translations
Closes: https://github.com/damus-io/damus/issues/3406
Signed-off-by: alltheseas <64376233+alltheseas@users.noreply.github.com>
This commit is contained in:
alltheseas
2025-12-10 10:56:31 -06:00
committed by Daniel D’Aquino
parent 48143f859a
commit 5058fb33d7
4 changed files with 56 additions and 23 deletions

View File

@@ -556,8 +556,8 @@ extension NdbNote {
return thread_reply() != nil
}
@MainActor
func note_language(ndb: Ndb, _ keypair: Keypair) -> String? {
assert(!Thread.isMainThread, "This function must not be run on the main thread.")
// Rely on Apple's NLLanguageRecognizer to tell us which language it thinks the note is in
// and filter on only the text portions of the content as URLs and hashtags confuse the language recognizer.