mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Also use Math.round() for folder percentage.
This commit is contained in:
parent
89c3be2280
commit
3779b311fd
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue