mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 00:53:26 +02:00
prevent crash
This commit is contained in:
@@ -164,10 +164,15 @@ public class HtmlEx {
|
||||
}
|
||||
|
||||
private /* static */ String getTextDirection(Spanned text, int start, int end) {
|
||||
if (TextDirectionHeuristics.FIRSTSTRONG_LTR.isRtl(text, start, end - start)) {
|
||||
return " dir=\"rtl\"";
|
||||
} else {
|
||||
return " dir=\"ltr\"";
|
||||
try {
|
||||
if (TextDirectionHeuristics.FIRSTSTRONG_LTR.isRtl(text, start, end - start)) {
|
||||
return " dir=\"rtl\"";
|
||||
} else {
|
||||
return " dir=\"ltr\"";
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
eu.faircode.email.Log.e(ex);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user