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

Reduce delay when selecting room list filters #3160

Merged

Conversation

jmartinesp
Copy link
Member

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Change RoomListFiltersPresenter filter toggling code from a flow.collectAsState() + LaunchedEffect(state) to a single by produceState.

Motivation and context

Previously, this had to wait for a recomposition until it was launched, which took ~100ms in a debug build. With these changes, the side effect is emitted in 10-20ms instead in the same device.

Tests

It's kind of difficult to test since you'd have to add logs to check when the action is triggered and when the actual logic change is emitted on develop and then do the same in this branch.

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

Previously, this had to wait for a recomposition until it was launched, which took ~100ms in a debug build. With these changes, the side effect is emitted in 10-20ms instead.
@jmartinesp jmartinesp added the PR-Misc For other changes label Jul 8, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner July 8, 2024 10:41
@jmartinesp jmartinesp requested review from ganfra and removed request for a team July 8, 2024 10:41
Copy link
Contributor

github-actions bot commented Jul 8, 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/13EzmK

Copy link

sonarcloud bot commented Jul 8, 2024

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.01%. Comparing base (3a91b4f) to head (932a11a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3160   +/-   ##
========================================
  Coverage    76.01%   76.01%           
========================================
  Files         1635     1635           
  Lines        38552    38552           
  Branches      7457     7457           
========================================
  Hits         29307    29307           
  Misses        5359     5359           
  Partials      3886     3886           

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

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 8, 2024
@jmartinesp jmartinesp enabled auto-merge (squash) July 8, 2024 11:26
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 8, 2024
@jmartinesp jmartinesp merged commit d9a498c into develop Jul 8, 2024
34 checks passed
@jmartinesp jmartinesp deleted the misc/jme/improve-delay-when-selecting-room-list-filters branch July 8, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants