This adds a feature flag, disabled by default, which disables the 'don't receive push notifications from other accounts used in this device' rule, which is useful in general, but problematic for testing.
Toggling this value had no effect because the feature was marked as finished so it wouldn't be displayed in the developer settings, which makes our code ignore any user-set value for it.
Instead, just create a `Feature` outside the `FeatureFlags` enum.
Remove dependencies flagged as unused by the Dependency Analysis Gradle Plugin
(`./gradlew buildHealth`) and explicitly declared in module build files.
Removals were skipped when the dependency provides transitively something the
module (or a consumer of an `api` dependency) uses directly, as well as for
runtime-only dependencies (element-call-embedded, sentry-android,
rustls-platform-verifier). Dependencies added by the convention plugin helpers
(composeDependencies, testCommonDependencies) are left untouched.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Allow displaying only unread notifications
Add `FeatureFlags.ShowAllActivityInRoomList` (enabled by default, to match the current behavior) that, when disabled, will display the unread messages of a room instead of unread notifications if no unread notifications are found
* Restore UI changes to the badges, `RoomSummaryRow` and `HorizontalFloatingToolbar`
* Fix `NavigationBarIcon`: use `BadgeBox` component.
* Adjust padding in `RoomSummaryRow` to 6.dp
* Fix other indicators not displaying a dot anymore
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
Adds the seam a native MatrixRTC call stack plugs into, with nothing behind it
yet, so that the stack itself lands as a self-contained change.
`FeatureFlags.NativeCall` is off by default and unfinished.
`features/callnative/api` declares `NativeCallEntryPoint`, and
`features/callnative/impl` provides a default that logs and does nothing:
turning the flag on today gets no call and a line in the log. That is the
honest outcome, where falling back to the WebView would make the flag look
broken rather than unimplemented.
`DefaultElementCallEntryPoint` forks on the flag. The read is asynchronous
because the flag is storage-backed, and caching it in an eagerly started
StateFlow would race a call placed just after app start onto the default
value.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Bump SDK bindings to `v26.09.26`
This version contains a fix for issues in `v26.09.25` related to certificate verification.
* Fix breaking API changes in the latest bindings
* Unify `FeatureFlags.RoomThreadList` with `FeatureFlags.Threads`
* Integrate the new renderer with the timeline UI
* Composable functions are now in `:libraries:htmlrenderer:api` so we don't need to add `impl` to other modules.
* Improve inline code span
* Return both the text and URL in `onLinkClick` and `onLinkLongClick` so we can check the URL is not misleading
* Remove `SelectionContainer` for now - it creates issues when long pressing
* Make `LocalComposeTimelineEventRenderer` contain a `ComposeLocalTimelineEventRendererData` instance. This checks if the new rendering is enabled and what is the current user id so it can be used for styling mention pills
* Add fading edges to code block to indicate scrolling is possible
* Long pressing in a code block copies its contents to the clipboard
* Fix alignment of ordered list item prefixes
* Don't use default values in State data classes
---------
Co-authored-by: ElementBot <android@element.io>
Metro's @BindingContainer replaced Dagger's @Module, but the declarations
kept the old Module suffix. Rename them (and their dedicated files) so the
type name matches the annotation, matching UserStatusBindingContainer which
already followed this convention.
No behaviour change: Metro discovers containers via @ContributesTo, so there
were only two call sites to update, both in tests.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cover the remaining interfaces of libraries/troubleshoot, libraries/matrixmedia,
libraries/dateformatter, libraries/featureflag, libraries/workmanager and
libraries/mediaviewer, along with their members and parameters.
Behaviours worth recording: NotificationTroubleshootTest reports its outcome
through its state flow rather than by returning, and its quickFix throws unless
the test offers one; DateFormatter.format turns a null timestamp into an empty
string so callers need no null check; ImageLoaderHolder keeps one loader per
session because decrypting room media needs that session's client.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
We modify the existing `FeaturesProvider` interface so that there can be more
than one of them, and the Features provided by *all* of the instances are
shown. We can then make another instance in element-android-enterprise, which
exposes enterprise-only features.
* Add a message search abstraction over the Rust SDK's local index
Wraps the SDK's search service so the rest of the app never sees MatrixRustSDK
types, following the existing convention in libraries/matrix.
- MessageSearch, MessageSearchService, MessageSearchResult and
MessageSearchPaginationState describe the surface in the api module.
- RustMessageSearch and RustMessageSearchService implement it, with
MessageSearchResultMapper and MessageSearchResultsProcessor turning SDK results
into Kotlin data classes.
- TantivyQueryEscaper escapes the query so a user typing ":)" or "AND" searches
for that literal text rather than tripping the tantivy parser, and joins every
word as a Must clause.
- Fakes and unit tests cover the mapping, the processor and the escaper, the last
checked against a real tantivy 0.26.1 parser.
* Attach the encrypted search index behind a disabled feature flag
Gives the client an on-device tantivy index encrypted with the session's client
secret, so encrypted rooms can be searched at all.
- The index store is attached at ClientBuilder time via withSearchIndexStore, in
a search-index directory alongside the session, keyed on the client secret. A
session without one gets no index.
- MatrixClient exposes isMessageSearchAvailable so callers gate on the real
indexing capability rather than on the raw flag, and getCacheSize() counts the
index directory so it stays visible in the settings figures.
- FeatureFlags.MessageSearch (feature.message_search) is off by default and
isFinished = false. It is read once at ClientBuilder time, so develop stays
releasable and nothing reaches a user.
* Simplify search index wiring following review
Tie search availability to the MessageSearch feature flag alone and let
the index be created without a client secret, encrypting it only when
the session has one, matching the SDK's SQLite stores. Make
getBaseClientBuilder take the flag as a required parameter and return
ClientBuilder directly again, dropping the BaseClientBuilder wrapper
and the mid-restore snapshot parameter. Check the flag through
FeatureFlagService in RustMatrixAuthenticationService instead of
caching it in a field, and revert the extra matrix_sdk_search tracing
target, which belongs in the SDK's defaults.
* 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>
Resolved conflicts:
- libraries/matrix/impl/.../fakes/FakeFfiSpaceRoomList.kt: took upstream's
direct return for rooms() — the simulateLongTask wrapper is for IO-style
operations like paginate/reset, not a quick read.
- libraries/ui-strings/src/main/res/values/temporary.xml: kept the file with
only the live strings (action_mark_as_read, a11y_jump_to_unread_messages).
Dropped common_black (upstream moved theme strings to module-local R.string)
and a11y_jump_to_unread_messages_count (badge count was removed earlier).
- RoomInfo.kt and its fixtures/tests: took upstream's version since both
branches independently added fullyReadEventId via the same SDK bump
(matrix-rust-components-kotlin 26.05.20).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Enable history sharing by default, unconditionally
* Remove feature-flag dep from history viz icons in room header
* Remove feature-flag dep from warning on inviting new people
* Remove feature-flag dep from warning on starting chat with new people
* Remove `enableKeyShareOnInvite` feature flag
* Update screenshots
* Remove redundant `FakeFeatureFlagService()` invocation, per review comment
---------
Co-authored-by: ElementBot <android@element.io>
* Rename `PushHandlingWakeLock` to `FetchPushForegroundServiceManager`. Move the start/stop logic from `FetchPushForegroundService.Companion` to it.
* Add more tests using Robolectric.
* Remove `FeatureFlags.SyncNotificationsWithWorkManager` and associated code: this should have been removed in one of the previous refactors, since we don't have the 2 ways to sync notifications anymore, everything uses the `WorkManager`
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
Add threads list screen for rooms:
- Add `ThreadsListService` to subscribe to thread changes in the room.
- Create `ThreadsListView` and its associated node a presenters (the UI may change).
- Add a menu icon in the room screen to open it.
This is still pending info about unread threads, so several UI components related to it will be hidden.
* Add feature flag and use it to hide the access to this new screen
---------
Co-authored-by: ElementBot <android@element.io>