-
Notifications
You must be signed in to change notification settings - Fork 204
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
Mark as unread #2519
Mark as unread #2519
Conversation
Generated by 🚫 Danger |
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.
Looks great so far 👍 We miss the WS event handling and the UI part, anything else?
Sources/StreamChat/Controllers/ChannelController/ChannelController.swift
Outdated
Show resolved
Hide resolved
@@ -434,6 +450,8 @@ open class ChatMessageListVC: _ViewController, | |||
cell.setDecoration(for: .header, decorationView: delegate?.chatMessageListVC(self, headerViewForMessage: message, at: indexPath)) | |||
cell.setDecoration(for: .footer, decorationView: delegate?.chatMessageListVC(self, footerViewForMessage: message, at: indexPath)) | |||
|
|||
// TODO: Add logic to show/hide separator based on `firstUnreadMessageId` |
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.
This logic should be in the ChatChannelVC, right?
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.
After the rebase with develop, yeah! Did not see that your changes were applied 😄
|
||
// THEN | ||
XCTAssertEqual(database.writeSessionCounter, 1) | ||
XCTAssertNotNil(readDTO(cid: cid, userId: userId)) |
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.
Do we want to check here the unreadCount
to ensure that nothing is being updated?
Tests/StreamChatTests/Repositories/ChannelRepository_Tests.swift
Outdated
Show resolved
Hide resolved
It looks great 🔥🔥🔥 |
fb20b11
to
b9e9012
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.
LGTM!
Is 6.0% Duplication some sort of false-positive thingy? |
SonarCloud Quality Gate failed. |
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.
great work @polqf 👏
🔗 Issue Links
https://github.com/GetStream/ios-issues-tracking/issues/285
🎯 Goal
This PR adds an option to mark as unread a chat starting from a particular message
📝 Summary
Now it is possible to select a particular message, and mark the channel as unread starting from that message.
🛠 Implementation
ChannelController exposes the first unread message id, and this one is used in the UI to show a banner (not part of this PR) to visually distinguish new messages
🧪 Manual Testing Notes
Expected result:
☑️ Contributor Checklist
🎁 Meme