kopia lustrzana https://github.com/ryukoposting/Signal-Android
Surround phone numbers with LTR unicode mark.
This also removes the previous TextView LTR flag that I had initially added for a one-off.devel
rodzic
58af54a77f
commit
9e4449924d
|
@ -79,7 +79,7 @@ public class PhoneNumberFormatter {
|
|||
}
|
||||
|
||||
public static @NonNull String prettyPrint(@NonNull String e164) {
|
||||
return get(ApplicationDependencies.getApplication()).prettyPrintFormat(e164);
|
||||
return StringUtil.forceLtr(get(ApplicationDependencies.getApplication()).prettyPrintFormat(e164));
|
||||
}
|
||||
|
||||
public @NonNull String prettyPrintFormat(@NonNull String e164) {
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
android:textDirection="ltr"
|
||||
tools:text="+1 (999) 555-1234" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -322,4 +322,8 @@ public final class StringUtil {
|
|||
iterator.setText(text);
|
||||
return iterator.countBreaks();
|
||||
}
|
||||
|
||||
public static String forceLtr(@NonNull CharSequence text) {
|
||||
return "\u202a" + text + "\u202c";
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue