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

Fix issues with stuck 'loading...' state and hangup #1690

Conversation

jmartinesp
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Add extraCapacity to the flows that relay messages between the Widget and the Rust Widget Driver to make sure we don't drop any messages. This was causing a stuck 'Loading...' state to be shown from time to time.
  • Add a better mechanism for hanging up with either the close button or the back one.

Motivation and context

Bugfixes.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 11

Checklist

@jmartinesp jmartinesp requested a review from a team as a code owner October 30, 2023 13:15
@jmartinesp jmartinesp requested review from bmarty and removed request for a team October 30, 2023 13:15
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.

2 remarks, else LGTM. The tests have to be updated.

@@ -90,10 +94,19 @@ class CallScreenPresenter @AssistedInject constructor(
.onEach {
// Relay message to Widget Driver
callWidgetDriver.value?.send(it)
println(it)
Copy link
Member

Choose a reason for hiding this comment

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

Strange to see println here. Use Timber or remove the temporary log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, I deleted a couple of other temporary logs, but I forgot about this one.

@@ -59,6 +62,7 @@ class CallScreenPresenter @AssistedInject constructor(

private val isInWidgetMode = callType is CallType.RoomCall
private val userAgent = userAgentProvider.provide()
private var joinedCall = false
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a rememberSaveable?

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

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

Comparison is base (fa66ffc) 63.70% compared to head (d9fa503) 63.68%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1690      +/-   ##
===========================================
- Coverage    63.70%   63.68%   -0.03%     
===========================================
  Files         1267     1267              
  Lines        32834    32835       +1     
  Branches      6797     6796       -1     
===========================================
- Hits         20918    20910       -8     
- Misses        8780     8789       +9     
  Partials      3136     3136              
Files Coverage Δ
...lement/android/features/call/data/WidgetMessage.kt 81.81% <100.00%> (-18.19%) ⬇️
...element/android/features/call/ui/CallScreenView.kt 23.52% <0.00%> (+0.67%) ⬆️
...ures/call/utils/WebViewWidgetMessageInterceptor.kt 0.00% <0.00%> (ø)
...nt/android/features/call/ui/CallScreenPresenter.kt 75.00% <50.00%> (-12.94%) ⬇️

... and 1 file with indirect coverage changes

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

@jmartinesp jmartinesp merged commit 356a321 into element-hq:develop Oct 30, 2023
11 of 13 checks passed
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

2 participants