-
Notifications
You must be signed in to change notification settings - Fork 226
Fix read receipt behavior when the timeline is opened. #4679
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
- filter Virtual item regarding typing to compute NewEventState - always scroll, since the latest event is always the typing notification (but with 0 height). This triggers the sending of RR.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
val newMostRecentItem = timelineItems.firstOrNull { | ||
// Ignore typing item | ||
(it as? TimelineItem.Virtual)?.model !is TimelineItemTypingNotificationModel | ||
} |
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.
Oh, good catch 👌 .
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.
Yes, I could also have dropped the first item, but I guess it's more accurate like this.
@jmartinesp I have updated the fix to fix regression on tests. I have tested again and the fix is still working (there is no tests covering the use case). Can you have a second look please? Thanks! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4679 +/- ##
===========================================
- Coverage 80.11% 80.11% -0.01%
===========================================
Files 2124 2124
Lines 56254 56256 +2
Branches 7012 7014 +2
===========================================
Hits 45068 45068
- Misses 8776 8777 +1
- Partials 2410 2411 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -286,19 +286,19 @@ private fun BoxScope.TimelineScrollHelper( | |||
} | |||
var jumpToLiveHandled by remember { mutableStateOf(true) } | |||
|
|||
fun scrollToBottom() { | |||
fun scrollToBottom(force: Boolean) { |
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.
Maybe add a comment for why the force
param is needed?
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.
|
Content
Ensure that ReadReceipt is sent when new messages are coming in and user is on the timeline.
Motivation and context
Closes #4662
Screenshots / GIFs
Tests
Tested devices
Checklist