Replace shortNumber() with formatNumber() (#3519)
formatNumber() was existing code to show numbers with suffixes like K, M, etc, so re-use that code and delete shortNumber(). Update the tests to (a) test formatNumber(), and (b) be parameterised.
This commit is contained in:
parent
dd1020e48a
commit
071e00774e
5 changed files with 78 additions and 78 deletions
|
|
@ -114,11 +114,11 @@ public class StatusViewHolder extends StatusBaseViewHolder {
|
|||
}
|
||||
|
||||
protected void setReblogsCount(int reblogsCount) {
|
||||
reblogsCountLabel.setText(NumberUtils.shortNumber(reblogsCount));
|
||||
reblogsCountLabel.setText(NumberUtils.formatNumber(reblogsCount, 1000));
|
||||
}
|
||||
|
||||
protected void setFavouritedCount(int favouritedCount) {
|
||||
favouritedCountLabel.setText(NumberUtils.shortNumber(favouritedCount));
|
||||
favouritedCountLabel.setText(NumberUtils.formatNumber(favouritedCount, 1000));
|
||||
}
|
||||
|
||||
protected void hideStatusInfo() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue