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

Edit : fallback to room.edit when timeline item is not found. #3239

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Jul 24, 2024

Content

Makes sure to use room.edit when event is not found in the timeline (mostly for draft).

Motivation and context

Message is not edited if the event is not found in the timeline.

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

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

@ganfra ganfra added the PR-Bugfix For bug fix label Jul 24, 2024
@ganfra ganfra marked this pull request as ready for review July 24, 2024 09:51
@ganfra ganfra requested a review from a team as a code owner July 24, 2024 09:51
@ganfra ganfra requested review from jmartinesp and removed request for a team July 24, 2024 09:51
@ganfra ganfra added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Jul 24, 2024
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/9PpBMo

editMessage(eventId, transactionId, message.markdown, message.html, message.mentions)
.onFailure { cause ->
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be mapFailure instead, so the result of room.editMessage is returned instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

U're right, good catch

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, we are not doing anything with the result, so I guess it doesn't really matter

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.14%. Comparing base (32052a0) to head (a23e5e2).

Files Patch % Lines
...s/impl/messagecomposer/MessageComposerPresenter.kt 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3239   +/-   ##
========================================
  Coverage    76.14%   76.14%           
========================================
  Files         1645     1645           
  Lines        38751    38757    +6     
  Branches      7525     7527    +2     
========================================
+ Hits         29506    29512    +6     
+ Misses        5336     5335    -1     
- Partials      3909     3910    +1     

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

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM!

@ganfra ganfra added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 24, 2024
@ganfra ganfra enabled auto-merge July 24, 2024 10:36
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 24, 2024
@ganfra ganfra merged commit f427c0e into develop Jul 24, 2024
35 of 36 checks passed
@ganfra ganfra deleted the feature/fga/use_room_edit branch July 24, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants