Skip to content
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

Rework can leave/delete conversation #4627

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Jan 17, 2025

resolve #4570

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added the 2. developing Work in progress label Jan 17, 2025
@mahibi mahibi self-assigned this Jan 17, 2025
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings104104
Errors3636

SpotBugs

CategoryBaseNew
Bad practice66
Correctness222222
Dodgy code7171
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310310

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4627-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi
Copy link
Collaborator Author

mahibi commented Jan 17, 2025

asked in chat:

Not sure if i understand #4570 correctly.
So if i understand correctly, regarding
"If the attribute canLeaveConversation is there it should be respected no matter any other things. Same for canDeleteConversation."
there is nothing to do as this is already the case:

if (!conversation!!.canLeaveConversation) {
binding.leaveConversationAction.visibility = GONE
} else {
binding.leaveConversationAction.visibility = VISIBLE
}
if (!conversation!!.canDeleteConversation) {
binding.deleteConversationAction.visibility = GONE
} else {
binding.deleteConversationAction.visibility = VISIBLE
}

And regarding
"Also make sure that canDeleteConversation is used to determine if "Delete all message" is shown."
i made the change
https://github.com/nextcloud/talk-android/pull/4627/files
Is that's all for the issue or did i get something wrong?

answer from Joas:

then it's good. The web accidentally had an additional condition for one-to-one conversations to hide delete

@mahibi mahibi added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 17, 2025
@mahibi mahibi requested a review from rapterjet2004 January 17, 2025 13:17
@mahibi mahibi added this to the 21.0.0 milestone Jan 17, 2025
@mahibi mahibi enabled auto-merge January 17, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check canLeaveConversation and canDeleteConversation handling
1 participant