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 issue where text is cleared when cancelling a reply #1617

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

jonnyandrew
Copy link
Contributor

@jonnyandrew jonnyandrew commented Oct 20, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fix issue where text is cleared when cancelling a reply.

Also remove redundant property on the MessageComposerMode.Normal class.

Motivation and context

Screenshots / GIFs

N/A

Tests

  • Start replying to a message
  • Click the x button to cancel the reply
  • Observe text is not cleared

Tested devices

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

Checklist

Comment on lines +158 to 162
if (messageComposerContext.composerMode is MessageComposerMode.Edit) {
localCoroutineScope.launch {
richTextEditorState.setHtml("")
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the fix

@jonnyandrew jonnyandrew marked this pull request as ready for review October 20, 2023 14:36
@jonnyandrew jonnyandrew requested a review from a team as a code owner October 20, 2023 14:36
@jonnyandrew jonnyandrew requested review from ganfra and removed request for a team October 20, 2023 14:36
@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link
Contributor

📱 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/yynLaV

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8aa706e) 58.98% compared to head (0d094fa) 58.98%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1617   +/-   ##
========================================
  Coverage    58.98%   58.98%           
========================================
  Files         1225     1225           
  Lines        31619    31619           
  Branches      6493     6494    +1     
========================================
  Hits         18652    18652           
  Misses       10143    10143           
  Partials      2824     2824           
Files Coverage Δ
...id/features/messages/impl/MessagesStateProvider.kt 90.69% <100.00%> (ø)
...impl/messagecomposer/MessageComposerContextImpl.kt 100.00% <100.00%> (ø)
...s/impl/messagecomposer/MessageComposerPresenter.kt 92.97% <100.00%> (+0.03%) ⬆️
...pl/messagecomposer/MessageComposerStateProvider.kt 95.23% <100.00%> (ø)
...atures/messages/test/MessageComposerContextFake.kt 100.00% <100.00%> (ø)
...ent/android/libraries/textcomposer/TextComposer.kt 80.47% <ø> (ø)
...id/libraries/textcomposer/components/SendButton.kt 81.08% <ø> (ø)
...ibraries/textcomposer/model/MessageComposerMode.kt 95.00% <ø> (-0.24%) ⬇️

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

@jonnyandrew jonnyandrew merged commit 7048da2 into develop Oct 23, 2023
17 checks passed
@jonnyandrew jonnyandrew deleted the jonny/fix-lost-reply-text branch October 23, 2023 08:31
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 fix and for having added a test for it!

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.

Message input box is cleared after cancelling a reply
3 participants