From: Bartek Przybylski Date: Wed, 23 May 2012 20:43:15 +0000 (+0200) Subject: merge fix X-Git-Tag: oc-android-1.4.3~390^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/3951aa97f0ff08ad62404822a3bab9986ef8c747?hp=--cc merge fix --- 3951aa97f0ff08ad62404822a3bab9986ef8c747 diff --cc src/eu/alefzero/owncloud/datamodel/OCFile.java index b087a9df,9566a193..336f95c3 --- a/src/eu/alefzero/owncloud/datamodel/OCFile.java +++ b/src/eu/alefzero/owncloud/datamodel/OCFile.java @@@ -322,15 -322,18 +322,27 @@@ public class OCFile implements Parcelab } @Override + public int compareTo(OCFile another) { + if (isDirectory() && another.isDirectory()) { + return getFileName().toLowerCase().compareTo(another.getFileName().toLowerCase()); + } else if (isDirectory()) { + return -1; + } else if (another.isDirectory()) { + return 1; + } + return getFileName().toLowerCase().compareTo(another.getFileName().toLowerCase()); + } + + public boolean equals(Object o) { + OCFile that = (OCFile) o; + return this.mId == that.mId; + } + + @Override + public String toString() { + String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s]"; + asString = String.format(asString, new Long(mId), getFileName(), mMimeType, isDownloaded(), mLocalPath, mRemotePath); + return asString; + } - - + }