Skip to content

fix: refresh share badges when folder etag is unchanged - #5013

Open
mvanhorn wants to merge 1 commit into
owncloud:masterfrom
mvanhorn:fix/4938-oc10-sharing-badges-refresh
Open

mvanhorn wants to merge 1 commit into
owncloud:masterfrom
mvanhorn:fix/4938-oc10-sharing-badges-refresh

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Related Issues

App:

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
    Not claimed: this diff changes no changelog or release-note file.
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)
    Not claimed: ReleaseNotesViewModel.kt was 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.

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.

Fixes owncloud#4938

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Sharing badges in oC10 are not refreshing

1 participant