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

Close the media preview screen ASAP with sending queue enabled #4089

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

Conversation

jmartinesp
Copy link
Member

Content

  • When the media file is done processing and we've pressed the 'send' button, just dismiss the attachment preview instead of waiting for the file to be sent.
  • For this, get the @SessionCoroutineScope from the SessionMatrixModule and use it to send the media even if the preview screen or the chat room screen are dismissed.
  • As soon as the sending process begins in background, dismiss the attachment preview screen.

Motivation and context

We decided to have this behaviour to improve the UX.

Screenshots / GIFs

Screen_recording_20241223_133920.mp4

Tests

  • Enable the 'Media upload through send queue' developer option.
  • Send a large media file, press the send button quickly.
  • There may still be some progress dialog while the thumbnail is being generated and the media is compressed, if enabled.
  • As seen in the video above, the preview screen should be dismissed and a local echo of the media file should appear.
  • After a few seconds, the media should be marked as sent.

Tested devices

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

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

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Dec 23, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner December 23, 2024 12:43
@jmartinesp jmartinesp requested review from ganfra and removed request for a team December 23, 2024 12:43
Copy link
Contributor

github-actions bot commented Dec 23, 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/GJ1Yve

@jmartinesp jmartinesp force-pushed the fix/early-dismiss-send-media-preview-screen branch from 8f2ed8f to 7e3d8b1 Compare December 23, 2024 13:01
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.25%. Comparing base (a26a02b) to head (7e3d8b1).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4089   +/-   ##
========================================
  Coverage    83.25%   83.25%           
========================================
  Files         1881     1881           
  Lines        49008    49008           
  Branches      5747     5747           
========================================
  Hits         40800    40800           
  Misses        6144     6144           
  Partials      2064     2064           

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

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.

1 participant