Closed Aitorbp closed 4 weeks ago
Following this same use case:
av.offline
Unset available offline
.The problem is that when doing a Set available offline
on a folder that has subfolders with downloaded files, the remote and local etag does not change, this is fine because there has been no remote change that updates the etag.
But in addition to that, another condition that we have for it to refresh the files in that folder will not be fulfit either. When we compared on Folder2 if the localChildToSync.localModificationTimestamp > remoteChild.lastSyncDateForData
they will both result in 0 as this value for folders will always be zero.
Therefore, with the new logic there would be nothing to refresh and it will not synchronize the files contained in that subfolder.
Another option that was considered to fix this was to control the keepInSync
parameter, but this is not updated until the end of the refresh function, when we have already received the files that we want to synchronize and sub folder2 is not among them.
To not further change the logic of the refreshFolder
function as a conclusion, a new parameter in SynchronizeFolderUseCase
called isActionSetFolderAvailableOffline
set by default to false will be created. When we perform the operation it will be set to true and a refresh of all the contents of that folder will be performed.
Related Issues
App: https://github.com/owncloud/android/issues/4402
ReleaseNotesViewModel.kt
creating a newReleaseNote()
with String resources (No required)QA