X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/f72289f7bfb2aef41f575cbfe225c94e4d5fabe2..bc472ee32b28e047fa07b7921a46fe572647712e:/src/com/owncloud/android/operations/RefreshFolderOperation.java diff --git a/src/com/owncloud/android/operations/RefreshFolderOperation.java b/src/com/owncloud/android/operations/RefreshFolderOperation.java index 61b13fc8..c61446e0 100644 --- a/src/com/owncloud/android/operations/RefreshFolderOperation.java +++ b/src/com/owncloud/android/operations/RefreshFolderOperation.java @@ -196,7 +196,7 @@ public class RefreshFolderOperation extends RemoteOperation { result = fetchAndSyncRemoteFolder(client); } else { fetchFavoritesToSyncFromLocalData(); - mChildren = mStorageManager.getFolderContent(mLocalFolder/*, false*/); + mChildren = mStorageManager.getFolderContent(mLocalFolder, false); } if (result.isSuccess()) { @@ -346,8 +346,7 @@ public class RefreshFolderOperation extends RemoteOperation { mFilesToSyncContents.clear(); // get current data about local contents of the folder to synchronize - // TODO Enable when "On Device" is recovered ? - List localFiles = mStorageManager.getFolderContent(mLocalFolder/*, false*/); + List localFiles = mStorageManager.getFolderContent(mLocalFolder, false); Map localFilesMap = new HashMap(localFiles.size()); for (OCFile file : localFiles) { localFilesMap.put(file.getRemotePath(), file); @@ -391,7 +390,8 @@ public class RefreshFolderOperation extends RemoteOperation { Log.d(TAG, "Image " + remoteFile.getFileName() + " updated on the server"); } updatedFile.setPublicLink(localFile.getPublicLink()); - updatedFile.setShareByLink(localFile.isShareByLink()); + updatedFile.setShareViaLink(localFile.isSharedViaLink()); + updatedFile.setShareWithSharee(localFile.isSharedWithSharee()); updatedFile.setEtagInConflict(localFile.getEtagInConflict()); } else { // remote eTag will not be updated unless file CONTENTS are synchronized @@ -456,12 +456,19 @@ public class RefreshFolderOperation extends RemoteOperation { } + /** + * Syncs the Share resources for the files contained in the folder refreshed (children, not deeper descendants). + * + * @param client Handler of a session with an OC server. + * @return The result of the remote operation retrieving the Share resources in the folder refreshed by + * the operation. + */ private RemoteOperationResult refreshSharesForFolder(OwnCloudClient client) { RemoteOperationResult result = null; // remote request GetRemoteSharesForFileOperation operation = - new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), false, true); + new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), true, true); result = operation.execute(client); if (result.isSuccess()) { @@ -502,7 +509,7 @@ public class RefreshFolderOperation extends RemoteOperation { private void fetchFavoritesToSyncFromLocalData() { - List children = mStorageManager.getFolderContent(mLocalFolder); + List children = mStorageManager.getFolderContent(mLocalFolder, false); for (OCFile child : children) { if (!child.isFolder() && child.isFavorite()) { SynchronizeFileOperation operation = new SynchronizeFileOperation(