-
Notifications
You must be signed in to change notification settings - Fork 114
Allow setting searchType dynamically in ChatChannelListViewModel #693
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
89715f4 to
3e722f7
Compare
| /// Creates a new message search controller, sets its delegate, and triggers the search operation. | ||
| open func performMessageSearch() { | ||
| messageSearchController = chatClient.messageSearchController() | ||
| messageSearchController?.delegate = self |
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.
Moved it because otherwise delegate makes a callback with 0 results before sync finishes and this makes the UI to flash.
| channel: channel, | ||
| message: message, | ||
| searchType: .channels | ||
| searchType: .messages |
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.
UI was flickering when changing the search type because incorrect search type was set here.
SDK Size
|
nuno-vieira
left a comment
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 ✅ we just need to fix the changelog
|


🔗 Issue Link
Resolves IOS-603
🎯 Goal
Allow setting
searchTypedynamically inChatChannelListViewModel🛠 Implementation
Make
searchTypepublic inChatChannelListViewModeland support reloading search results based on the type.🧪 Testing
For testing purposes I added locally a button for toggling it (ChatChannelListView.swift)
🎨 Changes
☑️ Checklist