Skip to content

Commit

Permalink
fix: changed to "else if"
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp authored and JuancaG05 committed Apr 9, 2024
1 parent 7a0c06a commit d86367b
Showing 1 changed file with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,23 +424,21 @@ class OCFileRepository(
if (remoteFolder.isAvailableOffline) AVAILABLE_OFFLINE_PARENT else NOT_AVAILABLE_OFFLINE

})
} else {
if (localChildToSync.etag != remoteChild.etag) {
// File exists in the database, we need to check several stuff.
folderContentUpdated.add(
remoteChild.apply {
copyLocalPropertiesFrom(localChildToSync)
// DO NOT update etag till contents are synced.
etag = localChildToSync.etag
needsToUpdateThumbnail =
(!remoteChild.isFolder && remoteChild.modificationTimestamp != localChildToSync.modificationTimestamp) || localChildToSync.needsToUpdateThumbnail
// Probably not needed, if the child was already in the database, the av offline status should be also there
if (remoteFolder.isAvailableOffline) {
availableOfflineStatus = AVAILABLE_OFFLINE_PARENT
}
// FIXME: What about renames? Need to fix storage path
})
}
} else if (localChildToSync.etag != remoteChild.etag) {
// File exists in the database, we need to check several stuff.
folderContentUpdated.add(
remoteChild.apply {
copyLocalPropertiesFrom(localChildToSync)
// DO NOT update etag till contents are synced.
etag = localChildToSync.etag
needsToUpdateThumbnail =
(!remoteChild.isFolder && remoteChild.modificationTimestamp != localChildToSync.modificationTimestamp) || localChildToSync.needsToUpdateThumbnail
// Probably not needed, if the child was already in the database, the av offline status should be also there
if (remoteFolder.isAvailableOffline) {
availableOfflineStatus = AVAILABLE_OFFLINE_PARENT
}
// FIXME: What about renames? Need to fix storage path
})
}
}

Expand Down

0 comments on commit d86367b

Please sign in to comment.