mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Generalize pinned nav menu counts
This commit is contained in:
@@ -133,6 +133,7 @@ import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -1523,6 +1524,12 @@ public class Helper {
|
||||
return DateUtils.getRelativeTimeSpanString(context, millis);
|
||||
}
|
||||
|
||||
static String formatNumber(Integer number, long max, NumberFormat nf) {
|
||||
if (number == null)
|
||||
return null;
|
||||
return nf.format(Math.min(number, max)) + (number > max ? "+" : "");
|
||||
}
|
||||
|
||||
static void linkPro(final TextView tv) {
|
||||
if (ActivityBilling.isPro(tv.getContext()) && !BuildConfig.DEBUG)
|
||||
hide(tv);
|
||||
|
||||
Reference in New Issue
Block a user