Closed praveen7512 closed 3 weeks ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Thanks for your contribution. We have another PR that fixes #4402, that is #4403... we will check yours as well.
Thanks for your contribution. We have another PR that fixes #4402, that is #4403... we will check yours as well.
That's right 😄, in any case, @praveen7512 you need to sign the Contributor License Agreement to be able to contribute to the ownCloud project (check https://github.com/owncloud/android/pull/4407#issuecomment-2120779790) 👍
Hello @praveen7512! Thank you very much for sending us this PR. I advise you that before you start working on an issue, you see if there is already someone else working on it with another solution. I recommend you take a look at this PR where the solution is more accurate than the one you propose.
I'm afraid I'm going to close this PR because it's invalid, due to the following points:
SynchronizeFileUseCase
, it has to go through SynchronizeFolderUseCase
. It's in the fileRepository.refreshFolder
function where you have to check if we've clicked on the available offline option. If you go back to the case I proposed in the issue, with the implementation you've developed it's not going to work.isActionSetFolderAvailable
Offline is not set to true in any case. Therefore it will always be set to false
. Also in the FileOperationsHelper.java
class you need to set the value of the parameter isActionSetFolderAvailable
, otherwise Android Studio won't compile.forceRefresh
function is not necessary, since the problem is not that the data is not downloaded and synchronized, but that the files that are to be made available offline are not being transferred correctly.So, due to all these errors and that it implies the majority of code in this PR, I'm closing it. In any case, thanks for your PR and do not hesitate to open more PRs, we will be happy to review your code again. 😃
…le offline
Added a new parameter
isActionSetFolderAvailableOffline
to theSynchronizeFileUseCase.Params
data class to handle forced synchronization when setting a folder to available offline.Updated
SynchronizeFileUseCase
to check for theisActionSetFolderAvailableOffline
parameter and force a refresh of the folder's contents.Implemented the
forceRefresh
method to initiate a download of the file regardless of the etag comparison whenisActionSetFolderAvailableOffline
is true.Ensured that locally deleted files are re-downloaded if they still exist on the remote server when the parent folder is set to available offline.
Added appropriate logging to track the synchronization process and forced refresh actions.
This fix addresses the issue where setting a folder to available offline did not correctly synchronize all its contents, especially when some files were deleted locally. Now, all files within the folder will be synchronized and set to available offline as expected.
Related Issues
App:
ReleaseNotesViewModel.kt
creating a newReleaseNote()
with String resources (if required)QA