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

Prevent widget web view from reloading on screen / orientation change (PSF-1034) #6140

Merged
merged 2 commits into from
May 25, 2022

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented May 24, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

This applies the same configChange settings we use on VectorCallActivity and VectorJitsiActivity to WidgetActivity to prevent the widget web view from reloading on device screen or orientation changes.

Motivation and context

We'll be using the widget system to integrate Element Call into the app. Currently rotating the device causes the widget web view to reload which disconnects the call.

Tests

  • Join #ecwidgettest:matrix.org
  • Navigate through into the widget web view running Element Call
  • Rotate the device
  • The web page shouldn't reload

Tested devices

  • Emulator
  • OS version(s): 12

Checklist

… (PSF-1034)

Signed-off-by: Johannes Marbach <johannesm@element.io>
@Johennes Johennes marked this pull request as draft May 24, 2022 14:34
@Johennes Johennes marked this pull request as ready for review May 24, 2022 14:40
@Johennes Johennes requested review from a team, onurays and ganfra and removed request for a team May 24, 2022 14:40
@github-actions
Copy link

Unit Test Results

124 files  ±0  124 suites  ±0   2m 4s ⏱️ -12s
220 tests ±0  220 ✔️ ±0  0 💤 ±0  0 ±0 
726 runs  ±0  726 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 7913a42. ± Comparison against base commit a59b8bf.

@bmarty bmarty added Z-Community-PR Issue is solved by a community member's PR and removed Z-Community-PR Issue is solved by a community member's PR labels May 25, 2022
Copy link
Contributor

@onurays onurays left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@Johennes
Copy link
Contributor Author

@ouchadam I heard you're short on reviews so maybe you could give the second review here in case Francois doesn't have time to get to it? 😇

@@ -306,7 +306,9 @@
android:supportsPictureInPicture="true" />

<activity android:name=".features.terms.ReviewTermsActivity" />
<activity android:name=".features.widgets.WidgetActivity" />
<activity android:name=".features.widgets.WidgetActivity"
Copy link
Contributor

@ouchadam ouchadam May 25, 2022

Choose a reason for hiding this comment

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

ideally we'd let the system reconfigure but avoid calling loadUrl on the webview on each creation buttt as we're already using this pattern in other screens 👍

@Johennes Johennes removed the request for review from ganfra May 25, 2022 11:41
@Johennes Johennes merged commit f5a621a into develop May 25, 2022
@Johennes Johennes deleted the johannes/widget-screen-rotation branch May 25, 2022 11:42
@github-actions
Copy link

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    = passed=20 failures=0 errors=0 skipped=3
  • [org.matrix.android.sdk.account]
    = passed=3 failures=0 errors=0 skipped=2
  • [org.matrix.android.sdk.internal]
    = passed=28 failures=1 errors=0 skipped=0
  • [org.matrix.android.sdk.ordering]
    = passed=16 failures=0 errors=0 skipped=0
  • [org.matrix.android.sdk.PermalinkParserTest]
    = passed=2 failures=0 errors=0 skipped=0

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

4 participants