Refactor: Use android plural handling

This commit is contained in:
Dr. Tobias Quathamer
2017-02-06 14:11:36 +01:00
parent 64a71f25f2
commit d1b95e369d
5 changed files with 17 additions and 25 deletions
@@ -178,7 +178,7 @@ public class DialogsSearchAdapter extends RecyclerView.Adapter {
case ROWTYPE_HEADLINE: {
GreySectionCell headlineCell = (GreySectionCell) viewHolder.itemView;
if (i == rowChatsHeadline) {
headlineCell.setText(LocaleController.formatPluralString("Chats", m_chatlistCnt));
headlineCell.setText(mContext.getResources().getQuantityString(R.plurals.Chats, m_chatlistCnt, m_chatlistCnt));
} else if (i == rowMsgsHeadline) {
headlineCell.setText(mContext.getResources().getQuantityString(R.plurals.messages, m_msgIds.length, m_msgIds.length));
}