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

Allow reaction to non sent Event (local echo for reaction) #3348

Closed
wants to merge 2 commits into from

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Aug 28, 2024

Content

Add support for local echo reaction. This is mainly allowing reaction to be added on non-sent event.

First commit introduce UniqueId value class, I recommend to review commit per commit.

Need matrix-org/matrix-rust-sdk#3749

Motivation and context

Improve reaction feature.

Screenshots / GIFs

Tests

  • In airplane mode, send message, react, redact reaction, do what you want.
  • When in network coverage again, the last local state should be sent to the homeserver.

There is a limitation described here which will may be fixed SDK side (the PR is not merged yet).

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

Copy link
Contributor

github-actions bot commented Aug 28, 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/q6gqmM

@bmarty bmarty force-pushed the feature/bma/reactionLocalEcho branch from 75e7668 to ac2c1f9 Compare August 28, 2024 11:38
@bmarty bmarty force-pushed the feature/bma/reactionLocalEcho branch from ac2c1f9 to ab184cb Compare August 28, 2024 13:01
Copy link

Also the SDK will manage local echo for reactions.
@ElementBot
Copy link
Collaborator

Fails
🚫

Please add a PR- label to categorise the changelog entry.

Messages
📖 Sign-off not required, allow-list

Generated by 🚫 dangerJS against a101492

@bmarty bmarty changed the title WIP Allow reaction to non sent Event (local echo for reaction) Aug 28, 2024
@@ -155,7 +156,7 @@ interface MatrixRoom : Closeable {

suspend fun sendFile(file: File, fileInfo: FileInfo, progressCallback: ProgressCallback?): Result<MediaUploadHandler>

suspend fun toggleReaction(emoji: String, eventId: EventId): Result<Unit>
suspend fun toggleReaction(emoji: String, uniqueId: UniqueId): Result<Unit>
Copy link
Member Author

Choose a reason for hiding this comment

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

UniqueId is useful here (for instance) to avoid having 2 Strings as parameter.

@bmarty
Copy link
Member Author

bmarty commented Sep 3, 2024

The branch has been merged to another one and is now in this PR: #3384.

@bmarty bmarty closed this Sep 3, 2024
@bmarty bmarty deleted the feature/bma/reactionLocalEcho branch October 21, 2024 13:09
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.

2 participants