-
Notifications
You must be signed in to change notification settings - Fork 1
Match WS events against filters #81
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 pull request implements local filtering for WebSocket events to avoid handling events that don't match configured filters. The core change replaces the generic QueryConfiguration system with type-safe query configurations and adds local filtering capabilities for activity added/updated events.
Key changes:
- Updated all filter fields to support local value extraction through lambda functions
- Migrated from the generic
QueryConfigurationto specific typed configurations - Implemented local filtering for activity events using the
matchesfunction - Updated package structure from
filtertosortfor sort-related components
Reviewed Changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Test files | Updated import statements and replaced generic QueryConfiguration with specific typed configurations |
| State implementation files | Added local filtering logic for activity events and updated query configuration types |
| Query definition files | Enhanced filter fields with local value extraction lambdas and updated type parameters |
| Utility files | Updated import paths for sort-related components |
| Repository files | Updated imports from filter to sort package |
| gradle/libs.versions.toml | Upgraded streamAndroidCore dependency version |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...-client/src/main/kotlin/io/getstream/feeds/android/client/api/state/query/ActivitiesQuery.kt
Show resolved
Hide resolved
SDK Size Comparison 📏
|
Goal
Implement changes to filter WS events locally so we can avoid handling events that don't match filters.
Core PR: GetStream/stream-core-android#14
iOS PR: GetStream/stream-feeds-swift#14
Implementation
localValuelambda for all filter fields. Note: some are not implemented because the local value doesn't existmatchesfunction to filter activity added & updated eventsTesting
An example where the effect of local filtering is evident is in the sample when creating a post or a story. Before, either would show up in both the regular timeline and the stories row, while now they only show up the correct place.
Checklist