Corrects number localization and adjusts the padding of the reblog avatars in right-to-left layout direction.

This commit is contained in:
Vavassor 2017-07-14 18:18:29 -04:00
commit 8559a6d75c
5 changed files with 14 additions and 5 deletions

View file

@ -15,6 +15,8 @@
package com.keylesspalace.tusky.util;
import java.text.NumberFormat;
public class DateUtils {
/* This is a rough duplicate of android.text.format.DateUtils.getRelativeTimeSpanString,
* but even with the FORMAT_ABBREV_RELATIVE flag it wasn't abbreviating enough. */
@ -45,6 +47,6 @@ public class DateUtils {
span /= YEAR;
unit = "y";
}
return prefix + span + unit;
return prefix + NumberFormat.getIntegerInstance().format(span) + unit;
}
}