-
Notifications
You must be signed in to change notification settings - Fork 739
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
CallTileTimelineItem.CallStatus.MISSED renders both missed and reject… #5089
Conversation
…ed calls. Logic should be !answered.
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, once again, could be nice to have @ganfra's blessing
@@ -101,7 +101,7 @@ class CallItemFactory @Inject constructor( | |||
createCallTileTimelineItem( | |||
roomSummary = roomSummary, | |||
callId = callEventGrouper.callId, | |||
callStatus = if (callEventGrouper.callWasMissed()) CallTileTimelineItem.CallStatus.MISSED else CallTileTimelineItem.CallStatus.ENDED, | |||
callStatus = if (!callEventGrouper.callWasAnswered()) CallTileTimelineItem.CallStatus.MISSED else CallTileTimelineItem.CallStatus.ENDED, |
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.
Can I ask you to remove !
and swap if and else blocks to simplify reading?
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.
was about to say the same thing 😄
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.
:). also the CI complains that the line is too long
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.
Done
Matrix SDKIntegration Tests Results:
|
Fixes #5088
The if statement switches between
CallStatus.MISSED
andCallStatus.ENDED
.CallStatus.MISSED
renders both missed calls and not answered calls. So i think the logic makes more sense to check that the call was not answered vs the old code which checks all events are from one side.