mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Language detection improvements
This commit is contained in:
@@ -6845,7 +6845,12 @@ public class FragmentCompose extends FragmentBase {
|
||||
if (spannedRef.length() > 0 && spannedRef.charAt(0) == '\n')
|
||||
spannedRef = (Spanned) spannedRef.subSequence(1, spannedRef.length());
|
||||
|
||||
Locale ref_lang = TextHelper.detectLanguage(context, spannedRef.toString());
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean language_detection = prefs.getBoolean("language_detection", false);
|
||||
|
||||
Locale ref_lang = (language_detection
|
||||
? TextHelper.detectLanguage(context, spannedRef.toString())
|
||||
: null);
|
||||
args.putSerializable("ref_lang", ref_lang);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user