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鈥檒l 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