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

ElementCall: allow user to switch to another call. #3833

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Nov 7, 2024

Content

When the user is in a call, starting (or joining) another call had no effect.

With the change in this PR, if the Activity get a new Intent with other call data, the current call is terminated and the new call starts. Actually the Activity is recreated as it was way simpler than trying to update all the internal state.

Motivation and context

Same behavior than on the iOS app.

Screenshots / GIFs

Tests

  • In room A start a call
  • Enter pip mode
  • Navigate to room B
  • In room B start a call

Call A should be terminated and Call B should be started

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner November 7, 2024 17:37
@bmarty bmarty requested review from jmartinesp and removed request for a team November 7, 2024 17:37
} else if (currentCallType == null) {
Timber.tag(loggerTag).d("Set the call type and create the presenter")
webViewTarget.value = callType
presenter = presenterFactory.create(callType!!, this)
Copy link
Member Author

Choose a reason for hiding this comment

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

Sadly i had to use !! here, the compiler is not clever enough (or is it me?)

Copy link
Member

Choose a reason for hiding this comment

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

You could also explicitly add && callType != null to the if clause.

@ElementBot
Copy link
Collaborator

Fails
🚫

Please add a PR- label to categorise the changelog entry.

Messages
📖 Sign-off not required, allow-list

Generated by 🚫 dangerJS against ea32b39

Copy link
Contributor

github-actions bot commented Nov 7, 2024

📱 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/y3HKzU

Copy link

sonarcloud bot commented Nov 7, 2024

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 82.99%. Comparing base (2386350) to head (ea32b39).
Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3833      +/-   ##
===========================================
- Coverage    83.00%   82.99%   -0.02%     
===========================================
  Files         1782     1782              
  Lines        44860    44872      +12     
  Branches      5265     5267       +2     
===========================================
+ Hits         37237    37242       +5     
- Misses        5789     5795       +6     
- Partials      1834     1835       +1     

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

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants