mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Removed conflict badge when conflict is solved
This commit is contained in:
parent
a2aa0479fc
commit
7399508e05
3 changed files with 10 additions and 1 deletions
|
@ -509,6 +509,7 @@ public class FileDataStorageManager {
|
|||
// maybe unnecessary, but should be checked TODO remove if unnecessary
|
||||
file.setStoragePath(null);
|
||||
saveFile(file);
|
||||
saveConflict(file, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1589,6 +1590,9 @@ public class FileDataStorageManager {
|
|||
}
|
||||
|
||||
public void saveConflict(OCFile file, boolean inConflict) {
|
||||
if (!file.isDown()) {
|
||||
inConflict = false;
|
||||
}
|
||||
ContentValues cv = new ContentValues();
|
||||
cv.put(ProviderTableMeta.FILE_IN_CONFLICT, inConflict);
|
||||
int updated = 0;
|
||||
|
|
|
@ -466,6 +466,8 @@ public class FileDownloader extends Service
|
|||
|
||||
/**
|
||||
* Updates the OC File after a successful download.
|
||||
*
|
||||
* TODO move to DownloadFileOperation
|
||||
*/
|
||||
private void saveDownloadedFile() {
|
||||
OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId());
|
||||
|
@ -482,6 +484,7 @@ public class FileDownloader extends Service
|
|||
file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
|
||||
mStorageManager.saveFile(file);
|
||||
mStorageManager.triggerMediaScan(file.getStoragePath());
|
||||
mStorageManager.saveConflict(file, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -670,7 +670,7 @@ public class FileUploader extends Service
|
|||
* synchronized with the server, specially the modification time and Etag
|
||||
* (where available)
|
||||
*
|
||||
* TODO refactor this ugly thing
|
||||
* TODO move into UploadFileOperation
|
||||
*/
|
||||
private void saveUploadedFile() {
|
||||
OCFile file = mCurrentUpload.getFile();
|
||||
|
@ -699,6 +699,7 @@ public class FileUploader extends Service
|
|||
if (oldFile.fileExists()) {
|
||||
oldFile.setStoragePath(null);
|
||||
mStorageManager.saveFile(oldFile);
|
||||
mStorageManager.saveConflict(oldFile, false);
|
||||
|
||||
} // else: it was just an automatic renaming due to a name
|
||||
// coincidence; nothing else is needed, the storagePath is right
|
||||
|
@ -706,6 +707,7 @@ public class FileUploader extends Service
|
|||
}
|
||||
file.setNeedsUpdateThumbnail(true);
|
||||
mStorageManager.saveFile(file);
|
||||
mStorageManager.saveConflict(file, false);
|
||||
}
|
||||
|
||||
private void updateOCFile(OCFile file, RemoteFile remoteFile) {
|
||||
|
|
Loading…
Reference in a new issue