Repository navigation
fix: refresh share badges when folder etag is unchanged - #5013
Conversation
There was a problem hiding this comment.
Thanks for the contribution @mvanhorn! Some comments about this PR
NOTE: Do not forget to split the changes into three commits: one for the fix, one for test (using the test: prefix) and another one for the calens file (chore: add calens file)
b3b7759 to
72c0a3c
Compare
|
Thanks for the review, @joragua. I've addressed everything:
The OCFileRepositoryTest suite and the full owncloudData unit tests pass locally, and detekt is clean. |
joragua
left a comment
There was a problem hiding this comment.
The second CR round is here @mvanhorn! Just check the comments below and it should be ready for QA 😄
NOTE: It's not necessary to create new commits for the changes. You can rebase the branch and include the changes in the existing commits. Let us know if you have any doubts!
|
Pushed two small follow-ups for the second round: 2cd2b3b drops the redundant comment in OCFileRepository, and 946f942 renames the test to match the naming convention. I added them as separate commits so the diff is easy to check. Glad to squash them into the existing commits if you prefer. The extra unit tests for the |
|
Some QA checks:
|
|
@mvanhorn your contribution is also QA-approved, congrats!! Please, rebase the branch against Thanks a lot for your engagement! 🚀 |
When the etag still matches but sharedByLink, permissions, or the boolean sharedWithSharee value differ (null and false count as equal), the child is now handled by the existing update branch in refreshFolder, so its share fields are saved while local properties and the local etag are kept. Fixes owncloud#4938 Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019jP1NBrfG9D7pKJLkd5yre
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019jP1NBrfG9D7pKJLkd5yre
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019jP1NBrfG9D7pKJLkd5yre
Signed-off-by: Matt Van Horn <mvanhorn@gmail.com>
7112e1c to
f296359
Compare
Related Issues
App:
Not claimed: this diff changes no changelog or release-note file.
ReleaseNotesViewModel.ktcreating a newReleaseNote()with String resources (if required)Not claimed:
ReleaseNotesViewModel.ktwas not run locally either.QA
When the etag still matches but sharedByLink, permissions, or the boolean sharedWithSharee value differ (null and false count as equal), that child is added to the files saved for the folder. The saved row keeps local properties, the existing etag, and the thumbnail-update flag, keeps the remote share fields, and is marked available offline through the parent when the parent is available offline. A unit test covers refreshFolder persisting a folder child in that case, and the unreleased changelog notes the badge refresh.
Pull to refresh on ownCloud 10 leaves folder share badges unchanged after a folder is shared or unshared in the web UI. The badges update only after that folder is opened and the user navigates back. Folder refresh writes a child back only when its etag differs from the local row. ownCloud 10 leaves the etag unchanged when only share metadata changes, so a new sharedByLink value, sharedWithSharee value, or permissions value is dropped.
Fixes #4938
AI was used for assistance.