projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b9ef747
)
Fix Select Local Version or Keep Both behaviour when solving file coflict
author
masensio
<masensio@solidgear.es>
Tue, 27 Oct 2015 13:32:42 +0000
(14:32 +0100)
committer
masensio
<masensio@solidgear.es>
Tue, 27 Oct 2015 13:32:42 +0000
(14:32 +0100)
src/com/owncloud/android/datamodel/FileDataStorageManager.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/datamodel/OCFile.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/db/ProviderMeta.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/files/services/FileDownloader.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/files/services/FileUploader.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/RefreshFolderOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/SynchronizeFileOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/UploadFileOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/providers/FileContentProvider.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/datamodel/FileDataStorageManager.java
b/src/com/owncloud/android/datamodel/FileDataStorageManager.java
index
24ba6de
..
540e83d
100644
(file)
--- a/
src/com/owncloud/android/datamodel/FileDataStorageManager.java
+++ b/
src/com/owncloud/android/datamodel/FileDataStorageManager.java
@@
-197,7
+197,7
@@
public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
- cv.put(ProviderTableMeta.FILE_
IN_CONFLICT, file.is
InConflict());
+ cv.put(ProviderTableMeta.FILE_
ETAG_IN_CONFLICT, file.getEtag
InConflict());
boolean sameRemotePath = fileExists(file.getRemotePath());
if (sameRemotePath || fileExists(file.getFileId())) { // for renamed files; no more delete and create
boolean sameRemotePath = fileExists(file.getRemotePath());
if (sameRemotePath || fileExists(file.getFileId())) { // for renamed files; no more delete and create
@@
-301,7
+301,7
@@
public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
- cv.put(ProviderTableMeta.FILE_
IN_CONFLICT, file.is
InConflict());
+ cv.put(ProviderTableMeta.FILE_
ETAG_IN_CONFLICT, file.getEtag
InConflict());
boolean existsByPath = fileExists(file.getRemotePath());
if (existsByPath || fileExists(file.getFileId())) {
boolean existsByPath = fileExists(file.getRemotePath());
if (existsByPath || fileExists(file.getFileId())) {
@@
-459,7
+459,7
@@
public class FileDataStorageManager {
// maybe unnecessary, but should be checked TODO remove if unnecessary
file.setStoragePath(null);
saveFile(file);
// maybe unnecessary, but should be checked TODO remove if unnecessary
file.setStoragePath(null);
saveFile(file);
- saveConflict(file,
false
);
+ saveConflict(file,
null
);
}
}
}
}
}
}
@@
-897,8
+897,7
@@
public class FileDataStorageManager {
c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1 ? true : false);
file.setDownloading(c.getInt(
c.getColumnIndex(ProviderTableMeta.FILE_IS_DOWNLOADING)) == 1 ? true : false);
c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1 ? true : false);
file.setDownloading(c.getInt(
c.getColumnIndex(ProviderTableMeta.FILE_IS_DOWNLOADING)) == 1 ? true : false);
- file.setInConflict(c.getInt(
- c.getColumnIndex(ProviderTableMeta.FILE_IN_CONFLICT)) == 1 ? true : false);
+ file.setEtagInConflict(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG_IN_CONFLICT)));
}
return file;
}
return file;
@@
-1234,10
+1233,7
@@
public class FileDataStorageManager {
ProviderTableMeta.FILE_IS_DOWNLOADING,
file.isDownloading() ? 1 : 0
);
ProviderTableMeta.FILE_IS_DOWNLOADING,
file.isDownloading() ? 1 : 0
);
- cv.put(
- ProviderTableMeta.FILE_IN_CONFLICT,
- file.isInConflict() ? 1 : 0
- );
+ cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
boolean existsByPath = fileExists(file.getRemotePath());
if (existsByPath || fileExists(file.getFileId())) {
boolean existsByPath = fileExists(file.getRemotePath());
if (existsByPath || fileExists(file.getFileId())) {
@@
-1468,12
+1464,12
@@
public class FileDataStorageManager {
}
}
- public void saveConflict(OCFile file,
boolean i
nConflict) {
+ public void saveConflict(OCFile file,
String etagI
nConflict) {
if (!file.isDown()) {
if (!file.isDown()) {
-
inConflict = false
;
+
etagInConflict = null
;
}
ContentValues cv = new ContentValues();
}
ContentValues cv = new ContentValues();
- cv.put(ProviderTableMeta.FILE_
IN_CONFLICT, inConflict ? 1 : 0
);
+ cv.put(ProviderTableMeta.FILE_
ETAG_IN_CONFLICT, etagInConflict
);
int updated = 0;
if (getContentResolver() != null) {
updated = getContentResolver().update(
int updated = 0;
if (getContentResolver() != null) {
updated = getContentResolver().update(
@@
-1498,7
+1494,7
@@
public class FileDataStorageManager {
Log_OC.d(TAG, "Number of files updated with CONFLICT: " + updated);
if (updated > 0) {
Log_OC.d(TAG, "Number of files updated with CONFLICT: " + updated);
if (updated > 0) {
- if (
inConflict
) {
+ if (
etagInConflict != null
) {
/// set conflict in all ancestor folders
long parentId = file.getParentId();
/// set conflict in all ancestor folders
long parentId = file.getParentId();
@@
-1551,7
+1547,7
@@
public class FileDataStorageManager {
while (parentPath.length() > 0) {
String where =
while (parentPath.length() > 0) {
String where =
- ProviderTableMeta.FILE_
IN_CONFLICT + " = 1
AND " +
+ ProviderTableMeta.FILE_
ETAG_IN_CONFLICT + " IS NOT NULL
AND " +
ProviderTableMeta.FILE_CONTENT_TYPE + " != 'DIR' AND " +
ProviderTableMeta.FILE_ACCOUNT_OWNER + " = ? AND " +
ProviderTableMeta.FILE_PATH + " LIKE ?";
ProviderTableMeta.FILE_CONTENT_TYPE + " != 'DIR' AND " +
ProviderTableMeta.FILE_ACCOUNT_OWNER + " = ? AND " +
ProviderTableMeta.FILE_PATH + " LIKE ?";
@@
-1568,7
+1564,8
@@
public class FileDataStorageManager {
updated = getContentResolver().update(
ProviderTableMeta.CONTENT_URI_FILE,
cv,
updated = getContentResolver().update(
ProviderTableMeta.CONTENT_URI_FILE,
cv,
- ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " + ProviderTableMeta.FILE_PATH + "=?",
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+ ProviderTableMeta.FILE_PATH + "=?",
new String[]{mAccount.name, parentPath}
);
} else {
new String[]{mAccount.name, parentPath}
);
} else {
@@
-1576,7
+1573,8
@@
public class FileDataStorageManager {
updated = getContentProviderClient().update(
ProviderTableMeta.CONTENT_URI_FILE,
cv,
updated = getContentProviderClient().update(
ProviderTableMeta.CONTENT_URI_FILE,
cv,
- ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " + ProviderTableMeta.FILE_PATH + "=?"
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+ ProviderTableMeta.FILE_PATH + "=?"
, new String[]{mAccount.name, parentPath}
);
} catch (RemoteException e) {
, new String[]{mAccount.name, parentPath}
);
} catch (RemoteException e) {
diff --git
a/src/com/owncloud/android/datamodel/OCFile.java
b/src/com/owncloud/android/datamodel/OCFile.java
index
84c7846
..
fcde054
100644
(file)
--- a/
src/com/owncloud/android/datamodel/OCFile.java
+++ b/
src/com/owncloud/android/datamodel/OCFile.java
@@
-74,7
+74,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
private boolean mIsDownloading;
private boolean mIsDownloading;
- private
boolean mInConflict;
+ private
String mEtagInConflict; // Save file etag in the server, when there is a conflict. No conflict = null
/**
/**
@@
-119,7
+119,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
mRemoteId = source.readString();
mNeedsUpdateThumbnail = source.readInt() == 1;
mIsDownloading = source.readInt() == 1;
mRemoteId = source.readString();
mNeedsUpdateThumbnail = source.readInt() == 1;
mIsDownloading = source.readInt() == 1;
- m
InConflict = source.readInt() == 1
;
+ m
EtagInConflict = source.readString()
;
}
}
@@
-145,7
+145,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
dest.writeString(mRemoteId);
dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
dest.writeInt(mIsDownloading ? 1 : 0);
dest.writeString(mRemoteId);
dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
dest.writeInt(mIsDownloading ? 1 : 0);
- dest.write
Int(mInConflict ? 1 : 0
);
+ dest.write
String(mEtagInConflict
);
}
/**
}
/**
@@
-343,7
+343,7
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
mRemoteId = null;
mNeedsUpdateThumbnail = false;
mIsDownloading = false;
mRemoteId = null;
mNeedsUpdateThumbnail = false;
mIsDownloading = false;
- m
InConflict = false
;
+ m
EtagInConflict = null
;
}
/**
}
/**
@@
-584,11
+584,11
@@
public class OCFile implements Parcelable, Comparable<OCFile> {
this.mIsDownloading = isDownloading;
}
this.mIsDownloading = isDownloading;
}
- public
boolean is
InConflict() {
- return mInConflict;
+ public
String getEtag
InConflict() {
+ return m
Etag
InConflict;
}
}
- public void set
InConflict(boolean i
nConflict) {
- m
InConflict = i
nConflict;
+ public void set
EtagInConflict(String etagI
nConflict) {
+ m
EtagInConflict = etagI
nConflict;
}
}
}
}
diff --git
a/src/com/owncloud/android/db/ProviderMeta.java
b/src/com/owncloud/android/db/ProviderMeta.java
index
7db74f0
..
f15dd9e
100644
(file)
--- a/
src/com/owncloud/android/db/ProviderMeta.java
+++ b/
src/com/owncloud/android/db/ProviderMeta.java
@@
-72,7
+72,7
@@
public class ProviderMeta {
public static final String FILE_REMOTE_ID = "remote_id";
\r
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";
\r
public static final String FILE_IS_DOWNLOADING= "is_downloading";
\r
public static final String FILE_REMOTE_ID = "remote_id";
\r
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";
\r
public static final String FILE_IS_DOWNLOADING= "is_downloading";
\r
- public static final String FILE_
IN_CONFLICT = "
in_conflict";
\r
+ public static final String FILE_
ETAG_IN_CONFLICT = "etag_
in_conflict";
\r
\r
public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME
\r
+ " collate nocase asc";
\r
\r
public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME
\r
+ " collate nocase asc";
\r
diff --git
a/src/com/owncloud/android/files/services/FileDownloader.java
b/src/com/owncloud/android/files/services/FileDownloader.java
index
16d9d5c
..
b6f21a5
100644
(file)
--- a/
src/com/owncloud/android/files/services/FileDownloader.java
+++ b/
src/com/owncloud/android/files/services/FileDownloader.java
@@
-471,7
+471,7
@@
public class FileDownloader extends Service
file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
mStorageManager.saveFile(file);
mStorageManager.triggerMediaScan(file.getStoragePath());
file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
mStorageManager.saveFile(file);
mStorageManager.triggerMediaScan(file.getStoragePath());
- mStorageManager.saveConflict(file,
false
);
+ mStorageManager.saveConflict(file,
null
);
}
/**
}
/**
diff --git
a/src/com/owncloud/android/files/services/FileUploader.java
b/src/com/owncloud/android/files/services/FileUploader.java
index
5024da7
..
7c953b8
100644
(file)
--- a/
src/com/owncloud/android/files/services/FileUploader.java
+++ b/
src/com/owncloud/android/files/services/FileUploader.java
@@
-574,7
+574,8
@@
public class FileUploader extends Service
saveUploadedFile();
} else if (uploadResult.getCode() == ResultCode.SYNC_CONFLICT) {
saveUploadedFile();
} else if (uploadResult.getCode() == ResultCode.SYNC_CONFLICT) {
- mStorageManager.saveConflict(mCurrentUpload.getFile(), true);
+ mStorageManager.saveConflict(mCurrentUpload.getFile(),
+ mCurrentUpload.getFile().getEtagInConflict());
}
} else {
uploadResult = grantResult;
}
} else {
uploadResult = grantResult;
@@
-704,7
+705,7
@@
public class FileUploader extends Service
if (oldFile.fileExists()) {
oldFile.setStoragePath(null);
mStorageManager.saveFile(oldFile);
if (oldFile.fileExists()) {
oldFile.setStoragePath(null);
mStorageManager.saveFile(oldFile);
- mStorageManager.saveConflict(oldFile,
false
);
+ mStorageManager.saveConflict(oldFile,
null
);
} // else: it was just an automatic renaming due to a name
// coincidence; nothing else is needed, the storagePath is right
} // else: it was just an automatic renaming due to a name
// coincidence; nothing else is needed, the storagePath is right
@@
-712,7
+713,7
@@
public class FileUploader extends Service
}
file.setNeedsUpdateThumbnail(true);
mStorageManager.saveFile(file);
}
file.setNeedsUpdateThumbnail(true);
mStorageManager.saveFile(file);
- mStorageManager.saveConflict(file,
false
);
+ mStorageManager.saveConflict(file,
null
);
mStorageManager.triggerMediaScan(file.getStoragePath());
mStorageManager.triggerMediaScan(file.getStoragePath());
diff --git
a/src/com/owncloud/android/operations/RefreshFolderOperation.java
b/src/com/owncloud/android/operations/RefreshFolderOperation.java
index
cf5bccd
..
61b13fc
100644
(file)
--- a/
src/com/owncloud/android/operations/RefreshFolderOperation.java
+++ b/
src/com/owncloud/android/operations/RefreshFolderOperation.java
@@
-392,7
+392,7
@@
public class RefreshFolderOperation extends RemoteOperation {
}
updatedFile.setPublicLink(localFile.getPublicLink());
updatedFile.setShareByLink(localFile.isShareByLink());
}
updatedFile.setPublicLink(localFile.getPublicLink());
updatedFile.setShareByLink(localFile.isShareByLink());
- updatedFile.set
InConflict(localFile.is
InConflict());
+ updatedFile.set
EtagInConflict(localFile.getEtag
InConflict());
} else {
// remote eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag("");
} else {
// remote eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag("");
diff --git
a/src/com/owncloud/android/operations/SynchronizeFileOperation.java
b/src/com/owncloud/android/operations/SynchronizeFileOperation.java
index
e7ced8e
..
bc0caf1
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFileOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFileOperation.java
@@
-222,7
+222,7
@@
public class SynchronizeFileOperation extends SyncOperation {
//if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
if (localChanged && serverChanged) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
//if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
if (localChanged && serverChanged) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
- getStorageManager().saveConflict(mLocalFile,
true
);
+ getStorageManager().saveConflict(mLocalFile,
mServerFile.getEtag()
);
} else if (localChanged) {
if (mSyncFileContents && mAllowUploads) {
} else if (localChanged) {
if (mSyncFileContents && mAllowUploads) {
@@
-265,7
+265,7
@@
public class SynchronizeFileOperation extends SyncOperation {
// safe blanket: sync'ing a not in-conflict file will clean wrong conflict markers in ancestors
if (result.getCode() != ResultCode.SYNC_CONFLICT) {
// safe blanket: sync'ing a not in-conflict file will clean wrong conflict markers in ancestors
if (result.getCode() != ResultCode.SYNC_CONFLICT) {
- getStorageManager().saveConflict(mLocalFile,
false
);
+ getStorageManager().saveConflict(mLocalFile,
null
);
}
}
}
}
diff --git
a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
index
0596232
..
4c2030e
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
@@
-340,7
+340,7
@@
public class SynchronizeFolderOperation extends SyncOperation {
}
updatedFile.setPublicLink(localFile.getPublicLink());
updatedFile.setShareByLink(localFile.isShareByLink());
}
updatedFile.setPublicLink(localFile.getPublicLink());
updatedFile.setShareByLink(localFile.isShareByLink());
- updatedFile.set
InConflict(localFile.is
InConflict());
+ updatedFile.set
EtagInConflict(localFile.getEtag
InConflict());
} else {
// remote eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag("");
} else {
// remote eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag("");
@@
-404,7
+404,7
@@
public class SynchronizeFolderOperation extends SyncOperation {
/// this should result in direct upload of files that were locally modified
SynchronizeFileOperation operation = new SynchronizeFileOperation(
child,
/// this should result in direct upload of files that were locally modified
SynchronizeFileOperation operation = new SynchronizeFileOperation(
child,
- (child.
isInConflict()
? null : child),
+ (child.
getEtagInConflict() != null
? null : child),
mAccount,
true,
mContext
mAccount,
true,
mContext
diff --git
a/src/com/owncloud/android/operations/UploadFileOperation.java
b/src/com/owncloud/android/operations/UploadFileOperation.java
index
0bc990f
..
ee9f7c8
100644
(file)
--- a/
src/com/owncloud/android/operations/UploadFileOperation.java
+++ b/
src/com/owncloud/android/operations/UploadFileOperation.java
@@
-311,10
+311,10
@@
public class UploadFileOperation extends RemoteOperation {
(new File(mFile.getStoragePath())).length() >
ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(),
(new File(mFile.getStoragePath())).length() >
ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(),
- mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtag());
+ mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtag
InConflict
());
} else {
mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(),
} else {
mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(),
- mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtag());
+ mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtag
InConflict
());
}
Iterator <OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
while (listener.hasNext()) {
}
Iterator <OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
while (listener.hasNext()) {
diff --git
a/src/com/owncloud/android/providers/FileContentProvider.java
b/src/com/owncloud/android/providers/FileContentProvider.java
index
3ddecc1
..
609c07c
100644
(file)
--- a/
src/com/owncloud/android/providers/FileContentProvider.java
+++ b/
src/com/owncloud/android/providers/FileContentProvider.java
@@
-106,8
+106,8
@@
public class FileContentProvider extends ContentProvider {
ProviderTableMeta.FILE_UPDATE_THUMBNAIL);
mFileProjectionMap.put(ProviderTableMeta.FILE_IS_DOWNLOADING,
ProviderTableMeta.FILE_IS_DOWNLOADING);
ProviderTableMeta.FILE_UPDATE_THUMBNAIL);
mFileProjectionMap.put(ProviderTableMeta.FILE_IS_DOWNLOADING,
ProviderTableMeta.FILE_IS_DOWNLOADING);
- mFileProjectionMap.put(ProviderTableMeta.FILE_IN_CONFLICT,
- ProviderTableMeta.FILE_IN_CONFLICT);
+ mFileProjectionMap.put(ProviderTableMeta.FILE_
ETAG_
IN_CONFLICT,
+ ProviderTableMeta.FILE_
ETAG_
IN_CONFLICT);
}
private static final int SINGLE_FILE = 1;
}
private static final int SINGLE_FILE = 1;
@@
-585,7
+585,7
@@
public class FileContentProvider extends ContentProvider {
+ ProviderTableMeta.FILE_REMOTE_ID + " TEXT null,"
+ ProviderTableMeta.FILE_UPDATE_THUMBNAIL + " INTEGER," //boolean
+ ProviderTableMeta.FILE_IS_DOWNLOADING + " INTEGER," //boolean
+ ProviderTableMeta.FILE_REMOTE_ID + " TEXT null,"
+ ProviderTableMeta.FILE_UPDATE_THUMBNAIL + " INTEGER," //boolean
+ ProviderTableMeta.FILE_IS_DOWNLOADING + " INTEGER," //boolean
- + ProviderTableMeta.FILE_
IN_CONFLICT + " INTEGER);" //boolean
+ + ProviderTableMeta.FILE_
ETAG_IN_CONFLICT + " TEXT);"
);
// Create table ocshares
);
// Create table ocshares
@@
-791,8
+791,8
@@
public class FileContentProvider extends ContentProvider {
db.beginTransaction();
try {
db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
db.beginTransaction();
try {
db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
- " ADD COLUMN " + ProviderTableMeta.FILE_
IN_CONFLICT + " INTEGER
" +
- " DEFAULT
0
");
+ " ADD COLUMN " + ProviderTableMeta.FILE_
ETAG_IN_CONFLICT + " TEXT
" +
+ " DEFAULT
NULL
");
upgraded = true;
db.setTransactionSuccessful();
} finally {
upgraded = true;
db.setTransactionSuccessful();
} finally {
diff --git
a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java
b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java
index
6230030
..
d0abff2
100644
(file)
--- a/
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
+++ b/
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
@@
-283,7
+283,7
@@
public class FileListListAdapter extends BaseAdapter implements ListAdapter {
);
\r
localStateView.setVisibility(View.VISIBLE);
\r
\r
);
\r
localStateView.setVisibility(View.VISIBLE);
\r
\r
- } else if (file.
isInConflict()
) { // conflict
\r
+ } else if (file.
getEtagInConflict() != null
) { // conflict
\r
localStateView.setImageResource(R.drawable.conflict_file_indicator);
\r
localStateView.setVisibility(View.VISIBLE);
\r
\r
localStateView.setImageResource(R.drawable.conflict_file_indicator);
\r
localStateView.setVisibility(View.VISIBLE);
\r
\r