Keep saved the calculated size of child-folders when a folders is refreshed
authorDavid A. Velasco <dvelasco@solidgear.es>
Mon, 21 Oct 2013 10:14:44 +0000 (12:14 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Mon, 21 Oct 2013 10:14:44 +0000 (12:14 +0200)
src/com/owncloud/android/operations/SynchronizeFolderOperation.java

index f16a1f3..32c27be 100644 (file)
@@ -356,6 +356,9 @@ public class SynchronizeFolderOperation extends RemoteOperation {
                 remoteFile.setModificationTimestampAtLastSyncForData(localFile.getModificationTimestampAtLastSyncForData());
                 remoteFile.setStoragePath(localFile.getStoragePath());
                 remoteFile.setEtag(localFile.getEtag());    // eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
+                if (remoteFile.isFolder()) {
+                    remoteFile.setFileLength(localFile.getFileLength()); // TODO move operations about size of folders to FileContentProvider
+                }
             } else {
                 remoteFile.setEtag(""); // remote eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
             }