mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Adapted ownCloud app to changes in ownCloud library interface
This commit is contained in:
parent
2bf9af5683
commit
3a02de8c90
4 changed files with 8 additions and 7 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 5b4f63ebdb365c6e7e9a3e0148aa18a8d5fb5067
|
||||
Subproject commit afb4ae1c2e15dfc3b3f9a9861b75d375e38f2805
|
|
@ -605,7 +605,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
|
|||
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(mCurrentUpload.getRemotePath());
|
||||
RemoteOperationResult result = operation.execute(mUploadClient);
|
||||
if (result.isSuccess()) {
|
||||
updateOCFile(file, result.getData().get(0));
|
||||
updateOCFile(file, (RemoteFile)result.getData().get(0));
|
||||
file.setLastSyncDateForProperties(syncDate);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import com.owncloud.android.datamodel.OCFile;
|
|||
import com.owncloud.android.files.services.FileDownloader;
|
||||
import com.owncloud.android.files.services.FileUploader;
|
||||
import com.owncloud.android.lib.network.OwnCloudClient;
|
||||
import com.owncloud.android.lib.operations.common.RemoteFile;
|
||||
import com.owncloud.android.lib.operations.common.RemoteOperation;
|
||||
import com.owncloud.android.lib.operations.common.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode;
|
||||
|
@ -89,7 +90,7 @@ public class SynchronizeFileOperation extends RemoteOperation {
|
|||
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
|
||||
result = operation.execute(client);
|
||||
if (result.isSuccess()){
|
||||
mServerFile = FileStorageUtils.fillOCFile(result.getData().get(0));
|
||||
mServerFile = FileStorageUtils.fillOCFile((RemoteFile)result.getData().get(0));
|
||||
mServerFile.setLastSyncDateForProperties(System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ public class SynchronizeFolderOperation extends RemoteOperation {
|
|||
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
|
||||
result = operation.execute(client);
|
||||
if (result.isSuccess()){
|
||||
OCFile remoteFolder = FileStorageUtils.fillOCFile(result.getData().get(0));
|
||||
OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile)result.getData().get(0));
|
||||
|
||||
// check if remote and local folder are different
|
||||
mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
|
||||
|
@ -256,12 +256,12 @@ public class SynchronizeFolderOperation extends RemoteOperation {
|
|||
* retrieved.
|
||||
* @return 'True' when any change was made in the local data, 'false' otherwise.
|
||||
*/
|
||||
private void synchronizeData(ArrayList<RemoteFile> folderAndFiles, OwnCloudClient client) {
|
||||
private void synchronizeData(ArrayList<Object> folderAndFiles, OwnCloudClient client) {
|
||||
// get 'fresh data' from the database
|
||||
mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
|
||||
|
||||
// parse data from remote folder
|
||||
OCFile remoteFolder = fillOCFile(folderAndFiles.get(0));
|
||||
OCFile remoteFolder = fillOCFile((RemoteFile)folderAndFiles.get(0));
|
||||
remoteFolder.setParentId(mLocalFolder.getParentId());
|
||||
remoteFolder.setFileId(mLocalFolder.getFileId());
|
||||
|
||||
|
@ -281,7 +281,7 @@ public class SynchronizeFolderOperation extends RemoteOperation {
|
|||
OCFile remoteFile = null, localFile = null;
|
||||
for (int i=1; i<folderAndFiles.size(); i++) {
|
||||
/// new OCFile instance with the data from the server
|
||||
remoteFile = fillOCFile(folderAndFiles.get(i));
|
||||
remoteFile = fillOCFile((RemoteFile)folderAndFiles.get(i));
|
||||
remoteFile.setParentId(mLocalFolder.getFileId());
|
||||
|
||||
/// retrieve local data for the read file
|
||||
|
|
Loading…
Reference in a new issue