Also use Math.round() for folder percentage.

This commit is contained in:
Felix Ableitner 2016-02-08 21:36:53 +01:00
parent 89c3be2280
commit 3779b311fd
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
directory.setText((folder.path));
if (model != null) {
int percentage = (model.globalBytes != 0)
? (int) Math.floor(100 * model.inSyncBytes / model.globalBytes)
? Math.round(100 * model.inSyncBytes / model.globalBytes)
: 100;
state.setText(getLocalizedState(getContext(), model.state, percentage));
items.setVisibility(VISIBLE);