浏览代码

Keep saved the calculated size of child-folders when a folders is refreshed

David A. Velasco 11 年之前
父节点
当前提交
5b6475cc84
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/com/owncloud/android/operations/SynchronizeFolderOperation.java

+ 3 - 0
src/com/owncloud/android/operations/SynchronizeFolderOperation.java

@@ -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)
             }