From 0707f6cf71e3d1f70fe4d61b229d4cccec24c06d Mon Sep 17 00:00:00 2001 From: masensio Date: Thu, 4 Jul 2013 10:34:57 +0200 Subject: [PATCH] OC-574: Show size in list from local database. OC-523 --- .../ui/adapter/FileListListAdapter.java | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index f678a93480..d0ea68403d 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -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); }