-
Notifications
You must be signed in to change notification settings - Fork 0
Handle comment reaction upserted and removed for Feed
#100
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
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
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 adds handling for comment reaction events (upserted and removed) in the Feed
component to address missing event handling functionality. The implementation follows the same pattern as activity reaction handling added in a previous PR.
Key changes include:
- Added
CommentReactionAdded
,CommentReactionDeleted
, andCommentReactionUpdated
event handling inFeedEventHandler
- Extended
StateUpdateEvent
classes to include feed ID parameter for comment reaction events - Added state update methods for comment reactions in
FeedStateUpdates
interface and implementation - Refactored test classes to use parameterized tests for better maintainability
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
FeedEventHandler.kt | Added handlers for comment reaction events with feed ID matching |
StateUpdateEvent.kt | Extended comment reaction events to include feed ID parameter |
FeedStateImpl.kt | Implemented comment reaction state update methods and added utility functions |
ActivityData.kt | Added helper functions for updating comment reactions within activities |
CommentData.kt | Added reaction manipulation utility functions for comments |
Various test files | Updated to use parameterized tests and adjusted for new event signatures |
Comments suppressed due to low confidence (1)
stream-feeds-android-client/src/test/kotlin/io/getstream/feeds/android/client/internal/test/TestData.kt:1
- The test name 'BookmarkUpserted' should be 'BookmarkUpdated' to match the actual event being tested (BookmarkUpdated).
/*
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...ds-android-client/src/main/kotlin/io/getstream/feeds/android/client/api/model/CommentData.kt
Outdated
Show resolved
Hide resolved
...ds-android-client/src/main/kotlin/io/getstream/feeds/android/client/api/model/CommentData.kt
Outdated
Show resolved
Hide resolved
SDK Size Comparison 📏
|
5cba573
to
1453860
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
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Goal
Part of AND-796
Continuing to add missing event handling (and refactoring handler tests to parameterized tests). This PR adds handling of comment reaction events for
Feed
.Implementation
The logic to change comment reactions is basically the same as the one for activity reactions implemented in #97
Testing
Not trivial to test manually in the sample because the comment reactions we're displaying don't come from a
Feed
instance, but fromActivity
. What one would need to do, for example, is adding code to observe and log comment reactions in an activity fromFeed.state
, then change comment reactions (even from the UI), and check that the emitted new comment reactions are correct.Checklist