refactor: optimize reference handling in profile and i18n modules

This commit is contained in:
Tunglies
2025-11-30 23:00:16 +08:00
parent 6897ead070
commit a1a9c2b7bb
3 changed files with 23 additions and 34 deletions
+2 -2
View File
@@ -82,9 +82,9 @@ pub async fn current_language() -> String {
.await
.latest_arc()
.language
.clone()
.as_ref()
.filter(|lang| !lang.is_empty())
.and_then(|lang| resolve_supported_language(&lang))
.and_then(|lang| resolve_supported_language(lang))
.unwrap_or_else(system_language)
}