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 the wrong mic button direction to cancel on RTL languages #7319

Conversation

ByeongsuPark
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fix the wrong mic button direction to cancel on RTL languages.
The cause of this bug is due to the distance calculation of X coordinate in DraggableStateProcessor.
The way to measure distance seems like not considering RTL languages.
So When it becomes RTL, the distance value becomes negative.
So I take the absolute value of the calculation.

Motivation and context

Fix #5968

Screenshots / GIFs

Before After
Screen_Recording_20221010_165103_Element.mp4
Screen_Recording_20221010_120413_Element.dbg.mp4

Tests

  • Step 1
    Enter the chat room
  • Step 2
    Test when it is not RTL. it works fine.
  • Step 3
    Developer Options -> Turn on "Force RTL Layout direction"
  • Step 4
    When dragging the mic button, it works differently with no RTL situation.

Tested devices

  • Physical (SM-G981N)
  • Emulator
  • OS version(s): Android 12

Checklist

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.

Thanks for the PR. Is there some possible side effect(s)? Like dragging become possible on the other direction? (I did not run your code).

@ByeongsuPark
Copy link
Contributor Author

ByeongsuPark commented Oct 10, 2022

When I looked into the code, rtlXMultiplier is applied except for the part that I modified.
So When I tested and self-reviewed, I cannot find any possible side effects or bugs.
Plz let me know if there are some suspicious points that can be missed

@bmarty bmarty enabled auto-merge October 10, 2022 16:12
@ByeongsuPark
Copy link
Contributor Author

ByeongsuPark commented Oct 11, 2022

Danger CI has failed. Is there any action I need to take?

@bmarty
Copy link
Member

bmarty commented Oct 13, 2022

No, that's fine, thanks!

@bmarty bmarty disabled auto-merge October 13, 2022 11:59
@bmarty bmarty merged commit 5b56ae1 into element-hq:develop Oct 13, 2022
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.

Wrong mic button direction (to cancel) on rtl languages
2 participants