Commit Graph

5674 Commits

Author SHA1 Message Date
Jorge Martín e371b46c68 Rename GetUrlResolver to UrlContentFetcher and TemporaryMatrixClientFactory.createTemporaryMatrixClient to just create 2026-08-11 13:18:49 +02:00
Jorge Martín dbc28df3eb Remove unnecessary call to fetchElementWellKnown when the value was up to date in the store in DefaultWellknownRetriever 2026-08-11 13:18:49 +02:00
Jorge Martín e92016c68e Improve host extraction in DefaultWellknownRetriever 2026-08-11 13:18:49 +02:00
Jorge Martín e24468c74f Fix and add tests 2026-08-11 13:18:49 +02:00
Jorge Martín e3290707d9 Remove no longer needed SessionWellknownRetriever 2026-08-11 13:18:49 +02:00
Jorge Martín 89908c2511 Add WellknownRetrieverResul.upToDateDataOrNull helper function for the enterprise module 2026-08-11 13:18:49 +02:00
Jorge Martín b9afbf0692 Add a session-scoped WellknownRetriever provider so we don't have to build it every time there 2026-08-11 13:18:49 +02:00
Jorge Martín ec0819ad07 Fixup geturlresolver matrix client 2026-08-11 13:18:49 +02:00
Jorge Martín 90d4fbe0bd Apply the GetUrlResolver pattern using unauthenticated matrix clients where possible 2026-08-11 13:18:49 +02:00
Jorge Martín 25eca29cd2 Rework WellknownRetriever so it uses the GetUrlResolver
Also, allow instantiating it using a factory: with this we can always decide where to take the config from and how to do it

Do the same for `ElementWellknownStore` so we can store and restore the values for different sources (endpoints) independently
2026-08-11 13:18:49 +02:00
Jorge Martín 3f19100427 Add TemporaryMatrixClient interface
This is an abstraction over an actual unauthenticated `Client` from the SDK that implements `GetUrlResolver`, and is supposed to be short-lived.

With this, we can use the SDK network stack to perform arbitrary GET url operations.

The `AutoCloseable` implementation makes it easier to clean up any leftover local config after using this temporary client.
2026-08-11 13:18:49 +02:00
Jorge Martín d48f5bd8b9 Have MatrixClient implement GetUrlResolver 2026-08-11 13:18:49 +02:00
Jorge Martín c8e43bdad6 Create GetUrlResolver interface
Implementations should just perform a GET request and return the raw body as bytes
2026-08-11 13:18:49 +02:00
Jorge Martín 49abaf5a5c Create EnterpriseRemoteConfigSource enum
This allows us to decide where to get the remote enterprise config from.
2026-08-11 13:18:49 +02:00
ganfra 6d6ca97899 Merge pull request #7328 from element-hq/feature/fga/user_status_last_pieces
User status last pieces
2026-08-11 11:11:12 +02:00
ganfra 0de78ed956 Merge branch 'develop' into feature/fga/user_status_last_pieces 2026-08-11 10:04:18 +02:00
bmarty 17c5d7db59 Sync Strings from Localazy 2026-08-11 09:27:29 +02:00
hayyaksi 348c7bcea8 Expand the emoji picker to full height when the keyboard is shown (#7382)
* Expand the emoji picker to full height when the keyboard is shown

The picker content is rendered with fillMaxSize, so the sheet measures itself to
the full window height. That makes the partially expanded anchor available, and
the modal sheet auto-shows at that anchor, half way down the screen.

The sheet reserves the IME inset through its content window insets, but applies
that padding at its own bottom edge, which is off-screen while it rests half way
down. The band that is both on-screen and above the keyboard is then only about
a tenth of the screen, which is why the matching emoji end up behind it.

Expand the sheet while the keyboard is visible so its bottom edge returns to the
screen edge and the inset it already reserves lands on top of the keyboard.
Modifier.imePadding on the sheet content is not an option: the sheet applies the
insets with windowInsetsPadding, which consumes them, so a nested imePadding
reads zero.

* Cover the keyboard driven sheet expansion with a test

The IME reaction moves into ExpandSheetWhenImeIsVisible so a Robolectric test can
drive it: dispatching window insets to the composition flips
WindowInsets.isImeVisible, and the sheet state is observable from the test. Both
the shown and the hidden case are asserted, which is the patch coverage this
change was missing.

* Do not leave a blank strip below the expanded emoji search

The 10dp of bottom padding on the search bar separates the collapsed
field from the category tabs underneath it. It stayed applied once the
search bar expanded to fill the picker, so the picker stopped 10dp short
of its own bottom edge.

That strip used to sit below the visible part of a half height sheet.
Now that the sheet expands against the keyboard it reads as a gap
between the results and the keyboard, so only pad while collapsed.
2026-08-10 16:35:38 +02:00
Jorge Martin Espinosa cb3b9e7946 Add default OAUTH_CLIENT_URL_PATH alternative (#7385)
* Add default `OAUTH_CLIENT_URL_PATH` alternative

Previously this was `null`, but we want to use `apps/android` instead to identify Element X Android. Element Pro will use a different value, and other custom apps based on EP will use `null` or their own custom value, if they provided one

* Suppress lint check so the pro app can be built
2026-08-10 16:16:14 +02:00
Benoit Marty 1693d325c1 Update UI according to https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=5781-5862 2026-08-10 12:12:55 +02:00
hayaksi1 38398c24b2 Show a Message not found placeholder when a replied to message cannot be loaded
When the replied to event could not be fetched, the reply preview rendered the
raw SDK error string in critical styling, and tapping it emitted a focus
request that could never succeed, so the user got a dead end dialog.

Render the localised error_message_not_found string in the neutral italic style
already used for redacted and undecryptable replies, and drop the click handler
for that case. The existing key is reused rather than adding a new one; a "you
do not have access" wording was rejected because this state covers any failure
to load the event, not only a permission problem.
2026-08-09 15:19:45 +03:00
Benoit Marty 044737a3a7 Merge pull request #6719 from element-hq/feature/bma/qrCodeLoginIteration
QR code login iteration
2026-08-07 17:31:50 +02:00
Benoit Marty 8f8c3af8c5 [LinkNewDevice] Log continuation / cancellation failure. 2026-08-07 16:42:49 +02:00
ganfra 06862ff3b2 Test synchronizes on profile persistence instead of advanceUntilIdle 2026-08-07 16:30:03 +02:00
ganfra 9b39843e69 Add withProfilesExtension override to FakeFfiSyncServiceBuilder 2026-08-07 14:22:52 +02:00
Benoit Marty 07ca468847 Merge pull request #7136 from element-hq/fix/a11y-invite-people
Announce checked/unchecked state for user rows in invite screen
2026-08-07 14:00:01 +02:00
ganfra 14c0944d22 Merge branch 'develop' into feature/fga/user_status_last_pieces 2026-08-07 11:35:19 +02:00
ganfra 8d2686d1a9 Merge branch 'develop' into feature/fga/user_status_last_pieces 2026-08-07 10:12:32 +02:00
Benoit Marty c8c8971889 Fix detekt false positive 2026-08-06 18:35:18 +02:00
Benoit Marty d1cf1aa09f Fix deprecation warning on androidx.compose.material3.ListItem 2026-08-06 18:35:17 +02:00
ganfra 0e563332ce Clean up formatting/detekt 2026-08-06 17:28:10 +02:00
Benoit Marty 9c66cd331f [Link new device] Handle split steps in the SDK 2026-08-06 17:22:10 +02:00
ganfra a7d2b86fe0 Show loading and failure feedback when updating user status 2026-08-06 16:15:44 +02:00
Benoit Marty 670ddd35f4 Fix compilation warning 2026-08-06 15:10:25 +02:00
Benoit Marty 4dffd7ddef Move deviceId, gitBranch and gitSha to the developer screens. 2026-08-06 14:46:28 +02:00
ganfra c35a0a3864 Sync automatic call status with user status flag and server support 2026-08-06 11:09:49 +02:00
ganfra 863cece4fb Subscribe to own profile updates and gate on server support 2026-08-05 16:14:59 +02:00
ganfra 494dc026fa Create fun ProfileDetails.toMatrixUser method 2026-08-05 16:14:59 +02:00
ganfra 489ef4666a Map displayed status for room members and timeline events 2026-08-05 16:14:59 +02:00
ganfra ac6cacb415 Add MatrixClient.isUserStatusSupported 2026-08-05 16:14:59 +02:00
ganfra 38102747ad Wire user status through the Rust SDK and refresh profile after change
# Conflicts:
#	libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt
2026-08-05 16:14:59 +02:00
Matthew Hodgson 0a577ffbb8 Render push notifications for live location share starts 2026-08-03 21:01:56 +02:00
hayyaksi e6d4472c0c Index messages locally in an encrypted on-device store so encrypted rooms can be searched at all (#7249)
* 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.
2026-07-30 11:17:40 +02:00
Jorge Martin Espinosa af9db20f4f Add extra vertical padding to ReplyToInvalidContent and ReplyToNotFoundContent (#7288)
* Add extra vertical padding to `ReplyToInvalidContent` and `ReplyToNotFoundContent`

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-07-30 10:30:22 +02:00
Jorge Martin Espinosa 49692794f9 Allow adding a path suffix to the OAuth client URI (#7286)
* Allow adding a path suffix to the OAuth client URI
2026-07-29 09:29:44 +00:00
Jorge Martin Espinosa 674354b1a6 Enforce HS disabling E2EE in DM creation too (Element Pro) (#7292)
This part was missing from the implementation of this Element Pro feature, which incorrectly only applied to rooms.
2026-07-29 09:17:41 +00:00
ganfra cc75e9386c Merge pull request #7287 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-26.x
Update dependency org.matrix.rustcomponents:sdk-android to v26.07.28
2026-07-29 02:03:53 +02:00
ganfra 8b970fb2f1 Fix license header on FakeFfiContinuationMessageSender 2026-07-29 01:21:05 +02:00
ganfra 3fc8972464 Fix unit test compilation for new continuationSender param on WaitingForAuth 2026-07-28 18:08:10 +02:00
ganfra 3933d5ab8c Merge pull request #7277 from element-hq/sync-localazy
Sync Strings
2026-07-28 16:44:21 +02:00