fix(Android): remove notification from collection when notification is clicked#6955
fix(Android): remove notification from collection when notification is clicked#6955
Conversation
WalkthroughAdds notification clearing logic to NotificationIntentHandler by retrieving the notId from intent extras, parsing it as an integer, and calling CustomPushNotification.clearMessages to remove previous messages before processing the new notification. This executes before serializing notification data for React Native delivery. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Proposed changes
Notifications are stored in a collection. When a notification was clicked, its data was not removed, causing old messages to appear again. This PR clears the notification by ID to prevent stacking.
Issue(s)
https://rocketchat.atlassian.net/browse/CORE-1769
How to test or reproduce
Expected: Only "Test-2" should appear in the notification.
Actual: Both "Test-1" and "Test-2" appear in the notification.
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.