Commit Graph

5489 Commits

Author SHA1 Message Date
Benoit Marty 8840e2f96b Merge pull request #7112 from element-hq/feature/bma/galleryMessages
Support gallery messages
2026-07-03 14:09:20 +02:00
Benoit Marty 74f69b7eb3 Optimize code 2026-07-03 09:50:35 +02:00
Benoit Marty ac60d0fce7 Merge pull request #7141 from element-hq/feature/bma/visualListItem
Iterate on visual list
2026-07-03 09:35:31 +02:00
Benoit Marty 00ffff4c0a Merge pull request #7133 from element-hq/fix/a11y-chats-search
Add accessibility label to search input
2026-07-02 15:30:39 +02:00
Benoit Marty 6b68ddcb25 Merge pull request #7135 from element-hq/fix/a11y-message-composer
Fix accessibility for message composer input and read receipts button
2026-07-02 15:30:09 +02:00
Benoit Marty f35546b473 Change text style of VisualList.
Ref: https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=2001-140
2026-07-02 14:57:11 +02:00
Benoit Marty d8b1a41f56 Create dedicated package for visual list and add Figma link. 2026-07-02 14:45:22 +02:00
Benoit Marty a3fbbed8f4 A11Y: Improve accessibility of search field.
Closes #6389
2026-07-02 13:16:01 +02:00
Benoit Marty c1dfd6d6ae A11Y: Improve talkback for video and image / preview not preview. 2026-07-02 11:10:14 +02:00
Benoit Marty 01c8064a16 Fix accessibility: add content description to video preview (#6382)
Set contentDescription on the ExoPlayer PlayerView so TalkBack announces
the video preview to screen reader users instead of treating it as
decorative/invisible content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:52:56 +02:00
Benoit Marty 79f1423a30 Fix accessibility: message composer label and 'Seen by' button (#6390, #6393)
- MarkdownTextInput: set contentDescription on MarkdownEditText so TalkBack
  announces a persistent label even when the field has content (fixes #6390)
- TimelineItemReadReceiptView: remove hideFromAccessibility() so the 'Seen by'
  button is exposed to TalkBack; use semantics (not clearAndSetSemantics) to
  preserve click action, and add Role.Button (fixes #6393)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:49:32 +02:00
Benoit Marty 16eec4d024 Simplify code 2026-06-30 12:33:10 +02:00
Benoit Marty 5ca1435e9e Remove dead code. 2026-06-30 12:26:43 +02:00
Aliaksandr Daroshchanka b8752152cf Add read all messages feature (#7049)
* Add read all messages feature: read all messages using Client.markAllRoomsAsRead() method

* Move the 'mark all rooms as read' footer as part of the list item

* Replace `showMarkAllRoomsAsReadConfirmation` and its associated event with `MarkAllRoomsAsRead(val needsConfirmation: Boolean)` and a `AsyncAction.Confirming` state

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-06-30 11:43:27 +02:00
Jorge Martin Espinosa 6068aeaf01 Detect RTL text in events and adjust the text rendering (#6994)
* Add `TextDirection.detect` to check the overall LTR or RTL direction of texts

* Calculate if the contents of events have a different direction than the layout to reverse the layout direction if needed.

LTR content, RTL text -> mismatched direction, reverse.
RTL content, LTR text -> also mismatched, reversed too.

* Measure text in `measureLastTextLine` based on its direction, not the layout's,
to avoid some issues with incorrectly calculated free space.

* Tweak the paddings in `TimelineEventTimestampView` a bit if the layout and text directions don't match

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-06-29 15:11:49 +02:00
Benoit Marty 5d0d8bedcd Fix name regarding naming convention 2026-06-29 14:28:14 +02:00
ElementBot 46460e1c27 Sync Strings (#7115)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-29 14:09:36 +02:00
Benoit Marty 79163b68b5 Fix quality issues 2026-06-29 11:50:28 +02:00
Benoit Marty fd799a3bdf Add unit test on TimelineEventContentMapper. 2026-06-29 11:13:29 +02:00
Benoit Marty dd3beb11bd Add unit test on GalleryMediaGalleryDataSource and simplify the code. 2026-06-29 10:28:10 +02:00
Benoit Marty fb7bc50cdb Rename test class. 2026-06-29 10:15:28 +02:00
Benoit Marty 1a5336e650 Add missing test on EventItemFactory 2026-06-29 10:15:00 +02:00
Benoit Marty 95e656cc32 Fix regression on tests. 2026-06-29 09:11:51 +02:00
Benoit Marty b62242cdd2 Fix sharing gallery from pinned event timeline. 2026-06-26 17:36:27 +02:00
Benoit Marty a7e6d8af6e Better fix to render all items in the gallery. Should be able to render mixed items. 2026-06-26 16:24:57 +02:00
bxdxnn 87aff40b26 Support gallery messages (#6519)
* Support gallery messages

* Address review

* Remove unused function

* Fix indent

* Add "Gallery" message prefix

* Support galleries for image editing

* Fix tapping on a tile opens the last item

* Fix overflow count

* Add caption editing to gallery messages

* Use the new gallery string for prefix

* Lock sending galleries behind a feature flag

* Fix detekts

* Fix

* Ensure image edition is saved when navigating

* Fix sending media broken on edited gallery.

* Fix tests

* Order imports

* Remove unused parameters.

* Fix copyright header of new files.

* Fix Konsist test

* Extract new previews to a dedicated file.

* Sync strings

* Remove unused import

* Update screenshots

* Trigger CI

* Remove parameters with default value.

* More cleanup

* Restore sendAsFile behavior.

* Improve Preview.

* Improve Preview.

* Improve Preview.

* Fix gallery sending cancel and retry issue

* Ensure any previous job is cancelled.

* Fix issue in summary message

* Gallery feature is disabled by default.

* Kotlin convention

* Remove useless parenthesis

* Update screenshots

* Fix test

* List -> ImmutableList

* Remove useless code.

* Render formatted caption for attachment list.

* Replace set of Booleans by an enum

* Remove unused model for individual caption in a gallery Event.

* Fix tests

* Fix tests

* Rework MediaViewer entry point.

And ensure that the clicked image from the gallery is displayed first.

* Ensure gallery item can be click in the pinned message list
Improve the gallery item click handling code.

* Improve code and fix separator color
Closes #7101

* React on attachment item click
Improve code

* Improve code and support 0 items in gallery.

* Fix click on attachment item not rendering anything.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-26 16:00:56 +02:00
Jorge Martín 16d16b92f5 Fix breaking API changes:
- Use `uniffi.ruma_events` types for `MessageLikeEventType` and `StateEventType`.
- Fix tests: using those 2 classes can sometimes call the SDK under the hood, trying to load the native library. We ignore the tests that cause it for now.
2026-06-26 08:16:56 +02:00
renovate[bot] a3736786cd Update dependency com.google.firebase:firebase-bom to v34.15.0 (#7089)
* Update dependency com.google.firebase:firebase-bom to v34.15.0

* Replace deprecated FCM `token` usages with `installationId`

Renamed a few components, changed the behaviour of `FirebaseTokenRotator` so it doesn't save the new token, `FirebaseMessagingService` will do it in its `onRegistered` method

* Enable firebase messaging installation_id

* Make sure we delete the FID when unregistering the app from Firebase

* Add `runFirebaseTask` util to convert `Task<T>` into a `Result<T>` returned from a suspending function

Also, rename the use cases and make them use the `invoke` pattern

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2026-06-25 09:48:48 +02:00
Jorge Martín b38b5a924f Remove Room.clearEventCacheStorage since it's not supported by the SDK anymore 2026-06-24 13:29:28 +02:00
Jorge Martín f62030ac5b Modify rustls' CertificateVerifier, removing the cert revocation logic:
This operation is not done by Android by default and doesn't properly support CRLs (Certificate Revocation Lists) which can be a problem with CAs like Let's Encrypt.
2026-06-24 13:29:28 +02:00
Jorge Martín 3586824a0d Remove UserCertificatesProvider:
`rustls-platform-verifier` automatically checks the user certs too, so there's no need to provide them separately.

This should also improve start times since we don't need to load the user certs when starting the app, which was a really slow operation.
2026-06-24 13:29:28 +02:00
ElementBot 932fdaeb2c Sync Strings (#7071)
* Sync Strings from Localazy

* Sync strings again.
Restore `screen_notification_settings_sound_system_default`

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2026-06-22 15:37:33 +02:00
Benoit Marty 1d33c1faed Merge pull request #6992 from element-hq/feature/bma/protectLinkNewDevice
Protect link new device
2026-06-22 10:40:17 +02:00
bxdxnn 790b9cff63 Hide message notification content when the app is locked (#6902)
* Hide message notification content by default when the app is locked

* Make this the default without an option

* Fix test

* Update DefaultNotificationDrawerManager.kt

* Fix
2026-06-19 15:34:38 +02:00
Benoit Marty d4aa49f3d3 Fix small code smell (#7058)
* RolesAndPermissionsNode does not need to implement RolesAndPermissionsNavigator and simplify the code.

* Remove default implementation in `RoomMemberListNavigator`

* Remove dead code.

* Fix test compilation issue
2026-06-19 15:33:01 +02:00
Jorge Martin Espinosa e370b33771 Fix Sonar with AGP 9 (some workarounds) (#7055)
Since it'll try to resolve their output, first they need to complete.
2026-06-19 13:12:54 +02:00
Benoit Marty 5ac7d2acb0 Merge pull request #7054 from element-hq/feature/bma/divider
Let Divider use our theme color.
2026-06-18 16:40:35 +02:00
Benoit Marty fdd3b9787f Use ElementTheme.colors.separatorPrimary for divider color.
And set the thickness to 1.dp
2026-06-18 14:07:14 +02:00
Benoit Marty cad2f7c409 Use our HorizontalDivider 2026-06-18 12:29:35 +02:00
Benoit Marty c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
Benoit Marty e54d93cd50 Compile with SDK 37 2026-06-18 12:18:31 +02:00
Benoit Marty d0f48a8e56 Fix deprecation warning
https://github.com/Kotlin/kotlinx.collections.immutable/blob/master/docs/0.5.0-MIGRATION.md
2026-06-17 15:33:57 +02:00
renovate[bot] 88db0c4988 Update jna monorepo to v5.19.1 (#7026)
* Update jna monorepo to v5.19.1

* Move JNA dependency to version catalog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-06-17 12:59:23 +00:00
Benoit Marty 355894cc74 Merge pull request #6944 from element-hq/feature/custom-recovery-key-wellknown
Add well-known parsing and extension seam for custom recovery passphrase
2026-06-17 13:58:22 +02:00
Benoit Marty 985faa5fa5 Merge remote-tracking branch 'origin/develop' into feature/bma/protectLinkNewDevice 2026-06-17 11:12:36 +02:00
Benoit Marty f7182127a9 RadioButton -> Checkbox 2026-06-17 10:42:22 +02:00
Benoit Marty 568e137cd4 Merge branch 'develop' into feature/bma/multipleForward 2026-06-17 10:31:44 +02:00
Jorge Martin Espinosa ac93044f49 Fix ANRs when calculating DB sizes for Sentry (#7017)
* Fix ANRs when calculating DB sizes for Sentry

Instead of using the SDK's `Client.getStoreSizes()` method, manually check the sizes using the file system.

For this, the `SessionPaths` need to be synchronously accessible from a `MatrixClient`. I removed `SessionPathsProvider` too since it's not needed anymore.
2026-06-16 16:49:09 +02:00
Jorge Martin Espinosa 8e9c0bedf2 Fix sharing media inside the app (#7016)
When a `MediaSource` is disposed, the local temp file associated to it will be deleted from disk.

When we try sharing a media from the media viewer screen to another room, this will dismiss the screen, which in turn will dispose of the media source and remove the file, which then fails to be shared.

If we copy it first and then make sure we delete it after trying to send it, it works fine.
2026-06-16 16:42:59 +02:00
Jorge Martin Espinosa 19ee0ae0cd Refactor: replace client-side event filtering for public rooms with SDK (#7025)
* Refactor: replace client-side event filtering for public rooms with an SDK-based one

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-06-16 12:48:11 +00:00