Pārlūkot izejas kodu

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

David A. Velasco 11 gadi atpakaļ
vecāks
revīzija
5b6475cc84

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

@@ -356,6 +356,9 @@ public class SynchronizeFolderOperation extends RemoteOperation {
                 remoteFile.setModificationTimestampAtLastSyncForData(localFile.getModificationTimestampAtLastSyncForData());
                 remoteFile.setModificationTimestampAtLastSyncForData(localFile.getModificationTimestampAtLastSyncForData());
                 remoteFile.setStoragePath(localFile.getStoragePath());
                 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)
                 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 {
             } else {
                 remoteFile.setEtag(""); // remote eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
                 remoteFile.setEtag(""); // remote eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
             }
             }