Removed the quantity item zero from string plural contributions_subtitle
Handled zero uplaod count from MainActivity
This commit is contained in:
Ashish 2020-12-01 16:38:30 +05:30 committed by GitHub
parent 2c5a45760f
commit f1b40728b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -207,9 +207,11 @@ public class MainActivity extends BaseActivity
*/
public void setNumOfUploads(int uploadCount) {
if (activeFragment == ActiveFragment.CONTRIBUTIONS) {
setTitle(getResources().getString(R.string.contributions_fragment) +" "+ getResources()
setTitle(getResources().getString(R.string.contributions_fragment) +" "+ (
!(uploadCount == 0) ?
getResources()
.getQuantityString(R.plurals.contributions_subtitle,
uploadCount, uploadCount));
uploadCount, uploadCount):getString(R.string.contributions_subtitle_zero)));
}
}