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 long click not working for media timeline items #3879

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

jmartinesp
Copy link
Member

Content

Add nullable onContentClick and onLongClick callbacks for the media timeline item content, so they can register custom actions for these user interactions.

Motivation and context

#3864 introduced a regression that prevented long click from working on media and location items unless they had a caption.

Screenshots / GIFs

No screenshot changes, I hope.

Tests

On a room, long press on:

  • An image/video item.
  • An image/video item with captions.
  • A sticker.
  • A location item.

You can double check other items too, but these should be the ones that changed.

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

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Nov 15, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner November 15, 2024 15:51
@jmartinesp jmartinesp requested review from ganfra and removed request for a team November 15, 2024 15:51
@jmartinesp jmartinesp force-pushed the fix/regression-on-timeline-items-long-click branch from f6307bc to 9e9aec9 Compare November 15, 2024 15:51
Copy link
Contributor

github-actions bot commented Nov 15, 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/qBeAGW

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.

Project coverage is 82.90%. Comparing base (7222a1f) to head (1aa937b).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...imeline/components/TimelineItemGroupedEventsRow.kt 0.00% 4 Missing ⚠️
...ssages/impl/timeline/components/TimelineItemRow.kt 50.00% 0 Missing and 1 partial ⚠️
...e/components/event/TimelineItemEventContentView.kt 66.66% 1 Missing ⚠️
...meline/components/event/TimelineItemStickerView.kt 0.00% 0 Missing and 1 partial ⚠️
...timeline/components/event/TimelineItemVideoView.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3879      +/-   ##
===========================================
- Coverage    82.90%   82.90%   -0.01%     
===========================================
  Files         1785     1785              
  Lines        45105    45111       +6     
  Branches      5326     5328       +2     
===========================================
+ Hits         37396    37398       +2     
- Misses        5843     5844       +1     
- Partials      1866     1869       +3     

☔ 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 Nov 18, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Nov 18, 2024
Copy link

sonarcloud bot commented Nov 18, 2024

@jmartinesp jmartinesp enabled auto-merge (squash) November 18, 2024 14:26
@jmartinesp jmartinesp merged commit 2405542 into develop Nov 18, 2024
27 of 29 checks passed
@jmartinesp jmartinesp deleted the fix/regression-on-timeline-items-long-click branch November 18, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants