I18N of counts

This commit is contained in:
M66B
2019-03-12 15:26:21 +00:00
parent 7364b97cb7
commit c4961ce7d2
4 changed files with 23 additions and 16 deletions

View File

@@ -315,15 +315,16 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
List<DrawerItem> items = new ArrayList<>();
for (TupleAccountEx account : accounts) {
StringBuilder sb = new StringBuilder();
sb.append(account.name);
String title;
if (account.unseen > 0)
sb.append(" (").append(nf.format(account.unseen)).append(")");
title = getString(R.string.title_name_count, account.name, nf.format(account.unseen));
else
title = account.name;
items.add(new DrawerItem(account.id,
"connected".equals(account.state)
? account.primary ? R.drawable.baseline_folder_special_24 : R.drawable.baseline_folder_24
: R.drawable.baseline_folder_open_24,
account.color, sb.toString(), account.unseen > 0));
account.color, title, account.unseen > 0));
}
items.add(new DrawerItem(-1));