mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 19:31:30 +00:00
Display local state instead of global state
This commit is contained in:
parent
4a775728a5
commit
b5d2ad93a5
1 changed files with 4 additions and 4 deletions
|
@ -63,17 +63,17 @@ public class FoldersAdapter extends ArrayAdapter<Folder> {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
int percentage = (model.globalBytes != 0)
|
int percentage = (model.localBytes != 0)
|
||||||
? Math.round(100 * model.inSyncBytes / model.globalBytes)
|
? Math.round(100 * model.inSyncBytes / model.localBytes)
|
||||||
: 100;
|
: 100;
|
||||||
binding.state.setText(getLocalizedState(getContext(), model.state, percentage));
|
binding.state.setText(getLocalizedState(getContext(), model.state, percentage));
|
||||||
binding.items.setVisibility(VISIBLE);
|
binding.items.setVisibility(VISIBLE);
|
||||||
binding.items.setText(getContext()
|
binding.items.setText(getContext()
|
||||||
.getString(R.string.files, model.inSyncFiles, model.globalFiles));
|
.getString(R.string.files, model.inSyncFiles, model.localFiles));
|
||||||
binding.size.setVisibility(VISIBLE);
|
binding.size.setVisibility(VISIBLE);
|
||||||
binding.size.setText(getContext().getString(R.string.folder_size_format,
|
binding.size.setText(getContext().getString(R.string.folder_size_format,
|
||||||
Util.readableFileSize(getContext(), model.inSyncBytes),
|
Util.readableFileSize(getContext(), model.inSyncBytes),
|
||||||
Util.readableFileSize(getContext(), model.globalBytes)));
|
Util.readableFileSize(getContext(), model.localBytes)));
|
||||||
setTextOrHide(binding.invalid, model.invalid);
|
setTextOrHide(binding.invalid, model.invalid);
|
||||||
} else {
|
} else {
|
||||||
binding.items.setVisibility(GONE);
|
binding.items.setVisibility(GONE);
|
||||||
|
|
Loading…
Reference in a new issue