X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/f0c302b0f8d3d263621c4c2cbb059dcd7ccbc3b4..ddfaa953c9a193ecae4fd36cd6b5a2788c8cc6b2:/src/com/owncloud/android/datamodel/OCFile.java diff --git a/src/com/owncloud/android/datamodel/OCFile.java b/src/com/owncloud/android/datamodel/OCFile.java index 32e118b6..d1821b44 100644 --- a/src/com/owncloud/android/datamodel/OCFile.java +++ b/src/com/owncloud/android/datamodel/OCFile.java @@ -60,15 +60,13 @@ public class OCFile implements Parcelable, Comparable { private boolean mNeedsUpdating; private long mLastSyncDateForProperties; private long mLastSyncDateForData; - private boolean mKeepInSync; + private boolean mFavorite; private String mEtag; private boolean mShareByLink; private String mPublicLink; - private boolean mFavorite; - private String mPermissions; private String mRemoteId; @@ -109,12 +107,11 @@ public class OCFile implements Parcelable, Comparable { mLocalPath = source.readString(); mMimeType = source.readString(); mNeedsUpdating = source.readInt() == 0; - mKeepInSync = source.readInt() == 1; + mFavorite = source.readInt() == 1; mLastSyncDateForProperties = source.readLong(); mLastSyncDateForData = source.readLong(); mEtag = source.readString(); mShareByLink = source.readInt() == 1; - mFavorite = source.readInt() == 1; mPublicLink = source.readString(); mPermissions = source.readString(); mRemoteId = source.readString(); @@ -135,12 +132,11 @@ public class OCFile implements Parcelable, Comparable { dest.writeString(mLocalPath); dest.writeString(mMimeType); dest.writeInt(mNeedsUpdating ? 1 : 0); - dest.writeInt(mKeepInSync ? 1 : 0); + dest.writeInt(mFavorite ? 1 : 0); dest.writeLong(mLastSyncDateForProperties); dest.writeLong(mLastSyncDateForData); dest.writeString(mEtag); dest.writeInt(mShareByLink ? 1 : 0); - dest.writeInt(mFavorite ? 1 : 0); dest.writeString(mPublicLink); dest.writeString(mPermissions); dest.writeString(mRemoteId); @@ -350,11 +346,10 @@ public class OCFile implements Parcelable, Comparable { mModifiedTimestampAtLastSyncForData = 0; mLastSyncDateForProperties = 0; mLastSyncDateForData = 0; - mKeepInSync = false; + mFavorite = false; mNeedsUpdating = false; mEtag = null; mShareByLink = false; - mFavorite = false; mPublicLink = null; mPermissions = null; mRemoteId = null; @@ -449,12 +444,12 @@ public class OCFile implements Parcelable, Comparable { mLastSyncDateForData = lastSyncDate; } - public void setKeepInSync(boolean keepInSync) { - mKeepInSync = keepInSync; + public void setFavorite(boolean favorite) { + mFavorite = favorite; } - public boolean keepInSync() { - return mKeepInSync; + public boolean isFavorite() { + return mFavorite; } @Override @@ -488,8 +483,8 @@ public class OCFile implements Parcelable, Comparable { @Override public String toString() { - String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s, parentId=%s, keepInSync=%s etag=%s]"; - asString = String.format(asString, Long.valueOf(mId), getFileName(), mMimeType, isDown(), mLocalPath, mRemotePath, Long.valueOf(mParentId), Boolean.valueOf(mKeepInSync), mEtag); + String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s, parentId=%s, favorite=%s etag=%s]"; + asString = String.format(asString, Long.valueOf(mId), getFileName(), mMimeType, isDown(), mLocalPath, mRemotePath, Long.valueOf(mParentId), Boolean.valueOf(mFavorite), mEtag); return asString; } @@ -510,14 +505,6 @@ public class OCFile implements Parcelable, Comparable { this.mShareByLink = shareByLink; } - public boolean isFavorite() { - return mFavorite; - } - - public void setFavorite(boolean mFavorite) { - this.mFavorite = mFavorite; - } - public String getPublicLink() { return mPublicLink; }