From: purigarcia Date: Fri, 21 Aug 2015 09:18:17 +0000 (+0200) Subject: Merge branch 'develop' into ignoreHiddenFiles X-Git-Tag: oc-android-1.8~34^2^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/e9ca430fa06e2f76520fe25b0971f82265487672?hp=0c7a9c3e3a0bba9344db08c8c2acf2718b968e92 Merge branch 'develop' into ignoreHiddenFiles --- diff --git a/src/com/owncloud/android/datamodel/OCFile.java b/src/com/owncloud/android/datamodel/OCFile.java index d1821b44..2aa5dbc0 100644 --- a/src/com/owncloud/android/datamodel/OCFile.java +++ b/src/com/owncloud/android/datamodel/OCFile.java @@ -543,6 +543,13 @@ public class OCFile implements Parcelable, Comparable { FileStorageUtils.getMimeTypeFromName(mRemotePath).startsWith("image/")); } + /** + * @return 'True' if the file is hidden + */ + public boolean isHidden() { + return getFileName().startsWith("."); + } + public String getPermissions() { return mPermissions; } diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index fbb209e5..5ec5c52c 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -496,9 +496,12 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi if (file.isFolder()) { foldersCount++; } else { - filesCount++; - if (file.isImage()){ - imagesCount++; + if (!file.isHidden()) { + filesCount++; + + if (file.isImage()) { + imagesCount++; + } } } }