-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
BugFix - External Share Icon Appreance After Delete #15153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
BugFix - External Share Icon Appreance After Delete #15153
Conversation
/backport to stable-3.32 |
@@ -650,6 +651,12 @@ public void sendNewEmail(OCShare share) { | |||
public void unShare(OCShare share) { | |||
unShareWith(share); | |||
|
|||
FileEntity entity = fileDataStorageManager.getFileEntity(file); | |||
if (entity != null) { | |||
entity.setSharedWithSharee(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tried it, but what if you have like this
- file with two sharees, e.g. share via mail and to user1
- unshare one of them
--> then this is triggered and set to false?
Then it will not show the sharees?
android/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java
Line 590 in 11bc0da
if ((file.isSharedWithMe() || file.isSharedWithSharee()) && !isMultiSelect() && !gridView && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback.
Since we are using ShareeListAdapter
for both internal and external shares, and the fields sharedWithSharee
and sharedViaLink
are used as boolean indicators rather than actual share counts (where 1 represents that a share exists and 0 means no shares), we can simplify the logic.
After removing a share, we can check whether the corresponding adapter (sharesListInternal or sharesListExternal) is empty. If so, we can safely set sharedWithSharee
or sharedViaLink
to 0 to indicate that there are no remaining shares of that type.
a89b7e0
to
4b7d49b
Compare
Signed-off-by: alperozturk <[email protected]>
…r returning back from the file details Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
4b7d49b
to
c4e1865
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15153.apk |
blue-Light-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/15153-Screenshot-blue-Light-14-48 |
Steps to Reproduce:
Actual Result:
The share icon sometimes continues to display the "shared" state, or doesn't update at all even after a hard refresh.
Expected Result:
After deleting the share, the icon should return to its default (unshared) state consistently.