-
Notifications
You must be signed in to change notification settings - Fork 302
Delete message for me #5967
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: develop
Are you sure you want to change the base?
Delete message for me #5967
Conversation
DB Entities have been updated. Do we need to upgrade DB Version?
|
SDK Size Comparison 📏
|
…n status for the current user
9c09a37
to
286f863
Compare
286f863
to
c74fd57
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.
Pull Request Overview
This PR implements the "Delete message for me" feature, allowing users to delete messages only from their own view while keeping them visible to other users. The feature adds a new deletedForMe
field to the Message model and corresponding database entity, along with API support for the delete-for-me operation.
Key changes include:
- Added
deletedForMe
Boolean field to the Message model and database entity - Implemented API endpoint for delete-for-me functionality with new query parameter
- Updated UI components to handle and display delete-for-me state
- Added sample implementation with custom component factory
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Message.kt | Added deletedForMe field to core Message model |
MessageEntity.kt | Added deletedForMe field to database entity |
MessageMapper.kt | Updated mapping between entity and domain model |
ChatDatabase.kt | Incremented database version for schema change |
MessageApi.kt | Added deleteForMe query parameter to delete endpoint |
ChatClient.kt | Added deleteMessageForMe method |
DeleteMessageForMeComponentFactory.kt | Sample UI component for delete-for-me functionality |
Various test files | Updated tests to support new delete-for-me parameter |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
title = "Delete for me", | ||
message = "Are you sure you want to delete this message for you?", |
Copilot
AI
Oct 15, 2025
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.
Hard-coded strings should be moved to string resources for better maintainability and localization support. Consider extracting these strings to the strings.xml file.
Copilot uses AI. Check for mistakes.
if (messageItem.message.deletedForMe) { | ||
Text( | ||
modifier = Modifier.padding(vertical = 4.dp), | ||
text = "Deleted only for me", |
Copilot
AI
Oct 15, 2025
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.
Hard-coded string should be moved to string resources for better maintainability and localization support. Consider extracting this string to the strings.xml file.
Copilot uses AI. Check for mistakes.
|
🎯 Goal
Describe why we are making this change
🛠 Implementation details
Describe the implementation
🎨 UI Changes
Add relevant screenshots
Add relevant videos
🧪 Testing
Explain how this change can be tested (or why it can't be tested)
Provide a patch below if it is necessary for testing
Provide the patch summary here