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

@@ -164,11 +164,13 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
ivNotify.setVisibility(folder.notify ? View.VISIBLE : View.GONE);
StringBuilder n = new StringBuilder();
n.append(folder.getDisplayName(context));
if (folder.unseen > 0)
n.append(" (").append(nf.format(folder.unseen)).append(")");
tvName.setText(n.toString());
tvName.setText(context.getString(R.string.title_name_count,
folder.getDisplayName(context),
nf.format(folder.unseen)));
else
tvName.setText(folder.getDisplayName(context));
tvName.setTypeface(null, folder.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL);
tvName.setTextColor(folder.unseen > 0 ? colorUnread : textColorSecondary);