1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-27 13:21:30 +00:00

Fix calculation of sync progress (fixes #866)

This commit is contained in:
Unrud 2017-07-18 17:41:58 +02:00
parent fd69477e6c
commit 45fb92c248

View file

@ -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);