Skip to content
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

Update the chat screen UI using RoomInfo. #1640

Merged
merged 7 commits into from
Oct 26, 2023

Conversation

jmartinesp
Copy link
Contributor

@jmartinesp jmartinesp commented Oct 26, 2023

This is specially useful for getting live values for hasRoomCall.

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Adds roomInfoFlow to MatrixRoom to get MatrixRoomInfo updates in real time.
  • Use that to get if a room has an active call.
  • Customize the join call button using this info.
  • Also map room name and avatar url from this RoomInfo to get live updates.

Motivation and context

Implements most of #1158.

Screenshots / GIFs

In the PR.

Tests

You can take a look at the screenshots or:

  • Log into 2 clients with EC integration.
  • Go to the same room on both.
  • Create a call in one of them, then actually join the call inside the webview.
  • In the other device, the 'create call' icon should have changed to a 'Join call' button.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 11, 14.

Checklist

@jmartinesp jmartinesp requested a review from a team as a code owner October 26, 2023 07:34
@jmartinesp jmartinesp requested review from julioromano and removed request for a team October 26, 2023 07:34
@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/8hakMn

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (71ef76a) 63.21% compared to head (64d42fb) 62.99%.
Report is 11 commits behind head on develop.

❗ Current head 64d42fb differs from pull request most recent head da79f0b. Consider uploading reports for the commit da79f0b to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1640      +/-   ##
===========================================
- Coverage    63.21%   62.99%   -0.22%     
===========================================
  Files         1201     1203       +2     
  Lines        31199    30933     -266     
  Branches      6446     6377      -69     
===========================================
- Hits         19721    19487     -234     
+ Misses        8518     8509       -9     
+ Partials      2960     2937      -23     
Files Coverage Δ
...ndroid/features/messages/impl/MessagesPresenter.kt 82.51% <100.00%> (-0.12%) ⬇️
...nt/android/features/messages/impl/MessagesState.kt 100.00% <100.00%> (ø)
...id/features/messages/impl/MessagesStateProvider.kt 92.85% <100.00%> (+0.40%) ⬆️
...libraries/matrix/api/room/CurrentUserMembership.kt 100.00% <100.00%> (ø)
...nt/android/libraries/matrix/api/room/MatrixRoom.kt 20.00% <ø> (ø)
...ndroid/libraries/matrix/api/room/MatrixRoomInfo.kt 100.00% <100.00%> (ø)
...droid/libraries/matrix/test/room/FakeMatrixRoom.kt 92.69% <100.00%> (+1.57%) ⬆️
...ent/android/features/messages/impl/MessagesView.kt 63.34% <68.75%> (+0.89%) ⬆️

... and 46 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp force-pushed the feature/jme/element-call-using-room-info branch from a3e29e9 to 64d42fb Compare October 26, 2023 08:59
@julioromano julioromano requested review from bmarty and removed request for julioromano October 26, 2023 11:01
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Icon(
modifier = Modifier.size(20.dp),
resourceId = CommonDrawables.ic_compound_video_call,
contentDescription = stringResource(CommonStrings.action_join)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A11y: Since there is a text in the button, with the same string, I think the contentDescription can be null here.

@jmartinesp jmartinesp enabled auto-merge (squash) October 26, 2023 13:35
@jmartinesp jmartinesp enabled auto-merge (squash) October 26, 2023 13:36
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jmartinesp jmartinesp merged commit 030e86f into develop Oct 26, 2023
13 checks passed
@jmartinesp jmartinesp deleted the feature/jme/element-call-using-room-info branch October 26, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants