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.
* 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>
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>
- 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>
* 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>
* 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>
* 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>
- 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.
* 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>
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.
`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.
* Hide message notification content by default when the app is locked
* Make this the default without an option
* Fix test
* Update DefaultNotificationDrawerManager.kt
* Fix
* RolesAndPermissionsNode does not need to implement RolesAndPermissionsNavigator and simplify the code.
* Remove default implementation in `RoomMemberListNavigator`
* Remove dead code.
* Fix test compilation issue