projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store file on db with 'downloading' state after adding it to pending downloads
[pub/Android/ownCloud.git]
/
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
853b01c
..
bda6166
100644
(file)
--- a/
src/com/owncloud/android/datamodel/OCFile.java
+++ b/
src/com/owncloud/android/datamodel/OCFile.java
@@
-27,7
+27,6
@@
import com.owncloud.android.lib.common.utils.Log_OC;
import java.io.File;
import third_parties.daveKoeller.AlphanumComparator;
import java.io.File;
import third_parties.daveKoeller.AlphanumComparator;
-
public class OCFile implements Parcelable, Comparable<OCFile> {
public static final Parcelable.Creator<OCFile> CREATOR = new Parcelable.Creator<OCFile>() {
public class OCFile implements Parcelable, Comparable<OCFile> {
public static final Parcelable.Creator<OCFile> CREATOR = new Parcelable.Creator<OCFile>() {
@@
-71,6
+70,8
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
private boolean mNeedsUpdateThumbnail;
private boolean mNeedsUpdateThumbnail;
+ private boolean mIsDownloading;
+
/**
* Create new {@link OCFile} with given path.
/**
* Create new {@link OCFile} with given path.
@@
-113,6
+114,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
mPermissions = source.readString();
mRemoteId = source.readString();
mNeedsUpdateThumbnail = source.readInt() == 0;
mPermissions = source.readString();
mRemoteId = source.readString();
mNeedsUpdateThumbnail = source.readInt() == 0;
+ mIsDownloading = source.readInt() == 0;
}
}
@@
-137,6
+139,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
dest.writeString(mPermissions);
dest.writeString(mRemoteId);
dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
dest.writeString(mPermissions);
dest.writeString(mRemoteId);
dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
+ dest.writeInt(mIsDownloading ? 1 : 0);
}
/**
}
/**
@@
-349,6
+352,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
mPermissions = null;
mRemoteId = null;
mNeedsUpdateThumbnail = false;
mPermissions = null;
mRemoteId = null;
mNeedsUpdateThumbnail = false;
+ mIsDownloading = false;
}
/**
}
/**
@@
-563,4
+567,12
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
this.mRemoteId = remoteId;
}
this.mRemoteId = remoteId;
}
+ public boolean isDownloading() {
+ return mIsDownloading;
+ }
+
+ public void setDownloading(boolean isDownloading) {
+ this.mIsDownloading = isDownloading;
+ }
+
}
}