-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
FIxed deletion of voice, video, image, contact and location messages #3319
Conversation
@AndyScherzinger PTAL |
2577140
to
4b25d14
Compare
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.
Breaks the calculation of the delete action by overwritting it. So the original place in the ChatActivity needs to be adapted yet not as simply as done here since there are further rules in place which determine if a chat message can be deleted.
So I think this needs some further work and alignment with @nickvergessen
@Smarshal21
|
wouldn't
also apply for any other file type then? like "documents" ? Just asking to be sure. |
yes that's true, it's for all other file types as well. but that's okay as far as i know. |
One more change i suggest: Shared files from the Nextcloud instance are handled differently. Currently with a long click it's only possible to "Open in files app", other options like deletion are not available.
just open the MessageActionDialog via
This would allow reactions and all the other options just like in web. @Smarshal21 just in case anything is confusing for you, just let me know if i should do these commits |
No i would like to handle that |
Done ππ» |
@@ -128,7 +128,7 @@ abstract class PreviewMessageViewHolder(itemView: View?, payload: Any?) : | |||
) | |||
} | |||
clickView!!.setOnLongClickListener { l: View? -> | |||
onMessageViewLongClick(message) | |||
previewMessageInterface!!.onPreviewMessageLongClick(message) |
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.
as the method
private fun onMessageViewLongClick(message: ChatMessage)..
is no longer used it can be deleted.
https://github.com/nextcloud/talk-android/pull/3319/files#diff-d097b26ec3d15c322bf4cf32bdb89ba37a00fd8c41bde2109848e68b0e559729R283
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.
Done
@@ -104,7 +104,7 @@ class MessageActionsDialog( | |||
hasUserActorId(message) && | |||
currentConversation?.type != ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL | |||
) | |||
initMenuDeleteMessage(showMessageDeletionButton) | |||
initMenuDeleteMessage(ChatMessage.MessageType.SYSTEM_MESSAGE != message.getCalculateMessageType()) |
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.
this needs to be reverted to be showMessageDeletionButton
again so the logic from ChatActivity to show/hide the deletion button is used.
private fun isShowMessageDeletionButton(message: ChatMessage): Boolean { |
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.
Done
@Smarshal21 please make sure to always sign your commits If you're using Android Studio to commit, you can use this checkbox in the UI once you set it up in git-config: |
Sorry for that |
to fix the missing sign-offs in this branch retrospectively, |
aa63863
to
9f793c2
Compare
Signed-off-by: Smarshal21 <[email protected]>
9f793c2
to
b652e45
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3319-talk.apk |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
πΌοΈ Screenshots
ποΈ Before | π‘ After
π§ TODO
π Checklist
/backport to stable-xx.x