mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Fix calculation of sync progress (fixes #866)
This commit is contained in:
parent
fd69477e6c
commit
45fb92c248
1 changed files with 2 additions and 2 deletions
|
@ -63,8 +63,8 @@ public class FoldersAdapter extends ArrayAdapter<Folder> {
|
|||
});
|
||||
|
||||
if (model != null) {
|
||||
int percentage = (model.localBytes != 0)
|
||||
? Math.round(100 * model.inSyncBytes / model.localBytes)
|
||||
int percentage = (model.globalBytes != 0)
|
||||
? Math.round(100 * model.inSyncBytes / model.globalBytes)
|
||||
: 100;
|
||||
binding.state.setText(getLocalizedState(getContext(), model.state, percentage));
|
||||
binding.items.setVisibility(VISIBLE);
|
||||
|
|
Loading…
Reference in a new issue