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
Implement Local Filter processing for ChannelListController #2488
Implement Local Filter processing for ChannelListController #2488
Conversation
Generated by 🚫 Danger |
5fdf56a
to
03454f3
Compare
Tests/StreamChatTests/Controllers/ChannelListController/ChannelListController_Tests.swift
Show resolved
Hide resolved
Tests/StreamChatTests/Controllers/ChannelListController/ChannelListController_Tests.swift
Show resolved
Hide resolved
Tests/StreamChatTests/Controllers/ChannelListController/ChannelListController_Tests.swift
Show resolved
Hide resolved
Tests/StreamChatTests/Controllers/ChannelListController/ChannelListController_Tests.swift
Outdated
Show resolved
Hide resolved
Tests/StreamChatTests/Controllers/ChannelListController/ChannelListController_Tests.swift
Outdated
Show resolved
Hide resolved
+ Update failing tests
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.
Overall looks good, just add some questions and suggested some improvements 👍
Co-authored-by: Nuno Vieira <nuno.fcvieira93@gmail.com>
184dbbc
to
4a802b4
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.
All good, just couple of comments 👏 Looking forward to getting this out!!
+ Make Payloads conform to Hashable + Implement filter.KeyValueMapper + Update ChannelListQuery with the keyValueMappers for each FilterKey + Add tests
This reverts commit 3ab68fb.
* Do not store messages from extension if app is receiving events * Add tests for NotificationExtensionLifecycle * Update tests for ChatRemoteNotificationHandler * Add tests for NSManagedObjectContext.discard * Address PR comments * Do not set a default value for 'store' in MessageRepository.getMessage * Fix specs compilation issue
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.
LGTM! ✅
Co-authored-by: Nuno Vieira <nuno.fcvieira93@gmail.com>
…https://github.com/GetStream/stream-chat-swift into feature/local-channel-filter-matching-implementation
Kudos, SonarCloud Quality Gate passed! |
🔗 Issue Links
Resolves https://github.com/GetStream/ios-issues-tracking/issues/261
🎯 Goal
Allow local filter processing in order to reduce the need for a local filter block in ChannelListController.
🛠 Implementation
This PR implements the following:
keyPathValueProvider
for FilterKeyskeyPathValueProvider
The logic is being described below:
FilterKeys that are compatible with local filter should provide a
keyPathValueProvider
.KeyPathValueProvider
are closures that provide the keypath for the requested value or return nil if the value cannot be mapped.The fetchRequest that the ChannelDTO, will include the filter's predicate if it's not nil. The fetchRequest can then be used to query the DB/
🧪 Manual Testing Notes
- Create a new Channel
- Update an existing Channel
- Public API Changes
StreamRuntimeCheck.isChannelLocalFilteringEnabled: Bool
(default:true
): When the flag istrue
the ChannelDTO will use the filter's predicate to create the fetchRequest.- Docusaurus Update Preview
☑️ Contributor Checklist
🎁 Meme