OC-574: Show size in list from local database. OC-523

This commit is contained in:
masensio 2013-07-04 10:34:57 +02:00
parent 856038af0d
commit 0707f6cf71

View file

@ -169,19 +169,23 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
}
else {
getDirectorySizeNumber(file,true);
if (lastModifiedOfAllSubdirectories == null)
{
lastModV.setVisibility(View.GONE);
fileSizeV.setVisibility(View.GONE);
}
else
{
lastModV.setVisibility(View.VISIBLE);
lastModV.setText(DisplayUtils.unixTimeToHumanReadable(lastModifiedOfAllSubdirectories));
fileSizeV.setVisibility(View.VISIBLE);
fileSizeV.setText(DisplayUtils.bytesToHumanReadable((totalSizeOfDirectoriesRecursive == null) ? 0 : totalSizeOfDirectoriesRecursive));
}
fileSizeV.setVisibility(View.VISIBLE);
fileSizeV.setText(DisplayUtils.bytesToHumanReadable(file.getFileLength()));
lastModV.setVisibility(View.VISIBLE);
lastModV.setText(DisplayUtils.unixTimeToHumanReadable(file.getModificationTimestamp()));
// getDirectorySizeNumber(file,true);
// if (lastModifiedOfAllSubdirectories == null)
// {
// lastModV.setVisibility(View.GONE);
// fileSizeV.setVisibility(View.GONE);
// }
// else
// {
// lastModV.setVisibility(View.VISIBLE);
// lastModV.setText(DisplayUtils.unixTimeToHumanReadable(lastModifiedOfAllSubdirectories));
// fileSizeV.setVisibility(View.VISIBLE);
// fileSizeV.setText(DisplayUtils.bytesToHumanReadable((totalSizeOfDirectoriesRecursive == null) ? 0 : totalSizeOfDirectoriesRecursive));
// }
checkBoxV.setVisibility(View.GONE);
view.findViewById(R.id.imageView3).setVisibility(View.GONE);
}