Commit Graph

5522 Commits

Author SHA1 Message Date
Benoit Marty 3642065202 Merge pull request #7171 from element-hq/feature/bma/cleanUpManifest
Cleanup AndroidManifest.xml files.
2026-07-08 17:59:36 +02:00
manfrommedan 55f3a1acfb Keep the in-progress edit when attaching media
Picking an attachment reset the composer to Normal, which dropped an
in-progress edit: the attachment went out as a new message and the
leftover edit text then created another one instead of editing the
original.

Route every attach path through a single resetComposerModeAfterAttaching()
helper that clears Reply/Normal but keeps an edit pending, so the typed
text still edits the original on the next send. This also covers the
multi-item gallery picker added in #6519, which reset the mode
unconditionally.

Reply is still cleared (the attachment becomes the reply).

Fixes #7083.
2026-07-08 15:32:01 +03:00
Benoit Marty 28abf3049e Cleanup AndroidManifest.xml files. 2026-07-08 11:55:50 +02:00
Benoit Marty 6124d99273 Merge pull request #7020 from bxdxnn/misc/svg-support
Add full SVG support
2026-07-08 10:57:12 +02:00
Jorge Martin Espinosa 885e042c12 Initial content scanner integration (#7139)
* Create a `ContentScanner` component:

- Add `:features:contentscanner:api` module with the interface.
- Implement the concrete component using the Rust SDK in `:libraries:matrix:impl`.

This can be used to both set up the content scanner media fetching in the SDK Client and manually scanning media sources from the Android side

* Create `ContentScannerUrlProvider` in a new `:features:contentscaner:api` module as a noop implementation

Use it as a placeholder for the code to instantiate a `RustContentScanner` with the fetched URL and set it as part of the SDK client.

* Expose the optional `ContentScanner` in the `@SessionScope`

* Split the storage part of the Element well-known retriever so it can be reused for the non-session bound retriever.

Also add the new `content_scanner_url` field to it.

This will be used by the enterprise code to fetch the actual content scanner url.

* Bump enterprise commit to have access to the actual content scanner url provider implementation

* Fix tests and lint issues

* Use the right namespace for `:features:contentscanner:api`, also use the right namespace for `impl`

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-07-08 07:50:22 +00:00
bxdxnn 4fd0be1fe5 Review 2026-07-07 16:46:42 +00:00
Benoit Marty 9672950512 Merge pull request #7138 from element-hq/fix/a11y-reading-order
Fix timeline reading order distorted when TalkBack is active
2026-07-07 09:42:00 +02:00
Benoit Marty 1ddb32645c Merge pull request #7007 from element-hq/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.5.0-alpha21
2026-07-06 18:31:45 +02:00
Benoit Marty ac1be8c87a Merge branch 'develop' into feature/bma/scroll-to-unread-messages 2026-07-03 14:30:14 +02:00
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 b6f79a883e Improve accessibility text on RR 2026-07-03 12:36:50 +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
bxdxnn c4c0c482f0 Address review 2026-06-23 14:02:15 +00: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
Benoit Marty fa5e871e7e Fix detekt issue 2026-06-19 15:02:29 +02:00
Benoit Marty 123037a612 Fix broken preview of BottomSheet in Android Studio. 2026-06-19 14:04:46 +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 643ece6af7 sheetStateForPreview does not need to be annotated with @Composable 2026-06-19 11:16:37 +02:00