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
[Reactions v2] New reactions query endpoint #3167
[Reactions v2] New reactions query endpoint #3167
Conversation
Sources/StreamChat/Controllers/MessageController/MessageController.swift
Outdated
Show resolved
Hide resolved
Sources/StreamChat/Controllers/MessageController/MessageController.swift
Outdated
Show resolved
Hide resolved
Generated by 🚫 Danger |
e719621
to
83ec4ff
Compare
StreamChat XCMetrics
|
|
||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
let reaction = reactions[indexPath.row] | ||
let cell = UITableViewCell(style: .value1, reuseIdentifier: "slack-reaction-cell") |
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.
It is a sample app, but just wondering why it was not using dequeueReusableCell(withIdentifier:for:)
. Not that it makes a huge difference here. I guess because there are only a couple of cells so it does not matter. Just thinking out aloud, feel free to ignore.
|
||
import CoreData | ||
|
||
class ReactionListUpdater: Worker { |
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.
Thinking if we should keep it next to the old load reactions method in MessageUpdater
.
// At the moment, we do not allow changing the query sorting. | ||
request.sortDescriptors = [.init(key: #keyPath(MessageReactionDTO.createdAt), ascending: false)] | ||
|
||
let messageIdPredicate = NSPredicate(format: "message.id == %@", query.messageId) |
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.
there was a nasty bug here - the message id wasn't used in the predicate. Therefore, whenever a reaction type was present, it showed all the reactions for all messages.
Quality Gate passedIssues Measures |
🔗 Issue Links
Resolves https://github.com/GetStream/ios-issues-tracking/issues/787
🎯 Goal
Adds the new reactions v2 query endpoint to be able to filter reactions based on type and author.
📝 Summary
ChatReactionListController
🛠 Implementation
Creates a new
ChatReactionListController
to follow the SDK pattern, where each query endpoint represents a controller.TODO:
ReactionListController
.🎨 Showcase
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2024-04-26.at.21.58.36.mp4
🧪 Manual Testing Notes
Note: Backend user enrichment is not working on the new query reactions endpoint. So this is not testable until it is fixed on the backend.
☑️ Contributor Checklist