-
Notifications
You must be signed in to change notification settings - Fork 1
Remove fid-based filtering of bookmarks events #145
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. |
SDK Size Comparison 📏
|
|
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 removes feed ID (fid) filtering for bookmark events and removes the fid property from poll-related events. The change addresses an issue where bookmark events were being filtered based on event.bookmark.activity.feeds, which doesn't contain all feed IDs that might display the activity (e.g., "for you" or timeline feeds).
Key changes:
- Bookmark events now match only on activity ID, removing feed-based filtering
- Poll event signatures simplified by removing the unused
fidparameter - Test cases updated to reflect new event signatures and filtering behavior
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| StateUpdateEvent.kt | Removed fid parameter from poll event data classes (PollDeleted, PollUpdated, PollVoteCasted, PollVoteChanged, PollVoteRemoved) and their mapping functions |
| FeedEventHandler.kt | Removed feed-based filtering for bookmark events (BookmarkAdded, BookmarkDeleted, BookmarkUpdated) |
| ActivityEventHandler.kt | Removed feed-based filtering from bookmark event handlers, keeping only activity ID matching |
| ActivityImpl.kt | Updated poll event emissions to exclude the fid parameter |
| FeedEventHandlerTest.kt | Updated test cases to remove non-matching feed tests for bookmarks and updated poll event instantiations |
| ActivityEventHandlerTest.kt | Removed non-matching feed bookmark tests and updated poll event test names and instantiations |
| ActivityListEventHandlerTest.kt | Updated poll event instantiations to remove fid parameter |
| PollListEventHandlerTest.kt | Updated poll event instantiations to remove fid parameter |
| PollVoteListEventHandlerTest.kt | Updated poll event instantiations to remove fid parameter |
| ActivityImplTest.kt | Updated all poll event assertions to match new signatures without fid |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Goal
Part of the wider AND-904.
This PR tackles the following: bookmark events don't have a fid so we use
event.bookmark.activity.feeds, but that doesn't necessarily contain all feed ids that might be displaying the activity, for example, it won't contain "for you" feeds (since they're virtual) or timeline feeds (since the activity belongs to a user feed, not to the timeline itself).Implementation
fidproperty from poll events -> we stopped using it some time agoTesting
In the demo app, adding/removing a bookmark to an activity in the feed should work correctly.
Checklist