element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.08k stars 155 forks source link

Fix long click not working for media timeline items #3879

Open jmartinesp opened 1 day ago

jmartinesp commented 1 day ago

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

https://github.com/element-hq/element-x-android/pull/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:

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

Tested devices

Checklist

github-actions[bot] commented 1 day ago

:iphone: 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/a7NWCZ

sonarcloud[bot] commented 1 day ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

codecov[bot] commented 1 day ago

Codecov Report

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

Project coverage is 82.86%. Comparing base (1be7993) to head (9e9aec9). Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...imeline/components/TimelineItemGroupedEventsRow.kt 0.00% 4 Missing :warning:
...ssages/impl/timeline/components/TimelineItemRow.kt 50.00% 0 Missing and 1 partial :warning:
...e/components/event/TimelineItemEventContentView.kt 66.66% 1 Missing :warning:
...meline/components/event/TimelineItemStickerView.kt 0.00% 0 Missing and 1 partial :warning:
...timeline/components/event/TimelineItemVideoView.kt 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3879 +/- ## =========================================== - Coverage 82.87% 82.86% -0.01% =========================================== Files 1785 1785 Lines 45100 45106 +6 Branches 5324 5326 +2 =========================================== + Hits 37377 37379 +2 - Misses 5857 5858 +1 - Partials 1866 1869 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.