Commit Graph

5858 Commits

Author SHA1 Message Date
Benoit Marty d3ab1ce43c Merge pull request #7562 from hayaksi1/fix/1548-dm-preview-sender
Drop the sender's name from the room list preview of two-person rooms
2026-08-27 11:19:32 +02:00
Benoit Marty d9c39e8f98 Merge pull request #7480 from bxdxnn/fix/deleted-messages-thread
Fix removed messages hiding its thread on deletion
2026-08-27 10:04:36 +02:00
Benoit Marty 740e3b621b Merge pull request #7344 from hayaksi1/fix/6371-save-file-name-conflicts
Keep saving files to Downloads once 32 files share the same name
2026-08-27 10:01:57 +02:00
Benoit Marty dba8f1b276 Merge pull request #7577 from element-hq/feature/bma/explorePushRules
Add a "Push rules" entry in the developer options
2026-08-26 13:54:07 +02:00
Benoit Marty 0801a415b5 Add a FileViewerEntryPoint to render in-memory content as a file
Introduce io.element.android.libraries.mediaviewer.api.FileViewerEntryPoint, a
reusable screen which renders content that is not a Matrix media the same way the
media viewer renders a file, with Share and Download actions.

The caller provides a filename, a mime type and the whole content as a String.
The node writes it to a temporary file in the cache directory, then reuses
LocalMediaView (so text content goes through TextFileViewer) and LocalMediaActions
for sharing and saving on disk. The node is contributed to AppScope so that the
screen can be used from any graph, since MediaViewerNode itself is bound to
RoomScope and depends on the timeline data sources.

Also route MimeTypes.Json to TextFileView in LocalMediaView, so that a json file
is rendered as text instead of falling back to the generic file card.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 12:11:04 +02:00
Benoit Marty c9da3ab490 Merge pull request #7520 from element-hq/feature/bma/updateFonts
Update fonts on the headings
2026-08-26 09:51:50 +02:00
hayaksi1 362acd6cab Run the database migrations again when a database is upgraded
Upgrading over an older install crashed before the login screen with
`SQLiteException: no such column: SessionData.position`. The session, cache
and push databases were opened at their new schema version but their tables
were never migrated.

`SqlCipherDriverFactory` overrides `AndroidSqliteDriver.Callback.onUpgrade` so
the database key can be replaced, and never called through to the base
implementation - which is the only thing that runs `schema.migrate`. Every
SQLDelight migration in the app was skipped as a result.

The override now calls `super.onUpgrade` after the re-key, so a database that
crosses the re-key version is still re-encrypted before its tables are
migrated. It moved out of an anonymous object into a named `MigrationCallback`
so the behaviour can be tested.

Part of #7509
2026-08-25 21:41:17 +03:00
hayaksi1 65c2cd8a79 Drop the sender's name from the room list preview of two-person rooms
The room list preview prefixes the sender's name unless the room is a
direct message. A room that was created as a group and later converted to
a direct message is not marked as one by the server, so its preview kept
naming the only other person in it on every message, while iOS did not.

The prefix now depends on how many people are actually in the room rather
than on the direct message flag, which is the behaviour asked for in the
issue: no name while only two people can be talking, the name back as
soon as a third joins.

Part of #1548
2026-08-25 20:55:38 +03:00
Benoit Marty 776cfc9c80 Add new type RoomRetention 2026-08-25 15:55:51 +02:00
Benoit Marty 16bc825c17 username has been renamed to serverNameFromUserId, but it is not necessary if we call homeserverUrl, so just remove it. 2026-08-25 15:55:29 +02:00
Benoit Marty 0634cadc9c Ensure translation of "Chats" does not render in big font when displayed on 2 lines. They can add the end be displayed on one line using the small font. 2026-08-25 11:54:15 +02:00
Benoit Marty 34a086261f PushHistoryEvents -> PushHistoryEvent 2026-08-25 10:33:58 +02:00
Benoit Marty cfa63156e2 TroubleshootNotificationsEvents -> TroubleshootNotificationsEvent 2026-08-25 10:33:16 +02:00
Benoit Marty 217ccb75ed BatteryOptimizationEvents -> BatteryOptimizationEvent 2026-08-25 10:32:34 +02:00
Benoit Marty cb8c462bad FullScreenIntentPermissionsEvents -> FullScreenIntentPermissionsEvent 2026-08-25 10:31:51 +02:00
bxdxnn 3d400bad4a Merge 2026-08-24 20:04:47 +00:00
Benoit Marty 9586478039 Updates to text sizes in Chats header and Space hero
Closes #7476
2026-08-24 18:58:54 +02:00
Benoit Marty 6ab3d7393b Merge pull request #7447 from hayaksi1/fix/6518-encryption-indicator
Hide the encryption badge when key storage is set up on the server
2026-08-24 18:26:00 +02:00
Benoit Marty b2b0927ea9 Merge branch 'develop' into fix/6371-save-file-name-conflicts 2026-08-24 18:14:03 +02:00
Benoit Marty 7d6aa9eb76 Group preview for clarity and to limit the number of screenshots. 2026-08-24 16:37:36 +02:00
Benoit Marty 0a0eebd804 [UserStatus] Add missing previews. 2026-08-24 16:22:09 +02:00
Benoit Marty 951539e698 [UserStatus] Only render the emoji for senders in the timeline 2026-08-24 16:22:08 +02:00
Benoit Marty e50dee8b9c Remove UserStatus feature flag. 2026-08-24 16:22:08 +02:00
Benoit Marty a3a0fdd0e9 Merge branch 'develop' into fix/4657-preview-param-suffix 2026-08-24 14:08:52 +02:00
bxdxnn 65a827559b Merge 2026-08-24 10:30:25 +00:00
Benoit Marty e6116d5840 Move all binding containers to a di package and normalize their method names
Every @BindingContainer now lives in a di subpackage, in a file named after
it. Containers that were declared inside a shared file (SimplePlayer.kt,
LockScreenConfig.kt, VoiceMessagePresenter.kt, TimelineItemPresenterFactories.kt,
MediaItemPresenterFactories.kt) are extracted into their own file.

Method names are made consistent too:
- @Binds functions are named bind<ConcreteParameterType>, fixing three that
  named something else (notably RoomAliasResolverBindingContainer, whose
  provider was still called providesJoinRoomPresenterFactory).
- @Provides functions are named after what they provide, and all use the
  provides prefix rather than a mix of provide and provides.

ANDROID_KEYSTORE moves back to the cryptography impl package, next to
KeyStoreSecretKeyRepository which uses it; it is not DI specific and would
otherwise be unreachable from there.

No behaviour change: Metro discovers containers via @ContributesTo and does
not care about method names, so the only call site to follow was in
DefaultVoiceRecorderTest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 11:38:11 +02:00
Benoit Marty 1018d26211 Rename all @BindingContainer types with a BindingContainer suffix
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>
2026-08-24 10:08:54 +02:00
hayaksi1 23005317cf Merge develop into the PreviewParam rename
The 174 commits develop gained since this branch was cut touch preview data
in three ways, and each is resolved so the flipped konsist rule still holds
across the merged tree.

Two screens the branch had renamed were deleted upstream by "Remove the
account provider search screen and homeserver resolver": the
changeaccountprovider and searchaccountprovider packages. Their deletion
wins, so ChangeAccountProviderStatePreviewParam, SearchAccountProviderStatePreviewParam
and the two views that used them go with them rather than coming back
under the new name.

Two preview classes develop added still carried the old suffix and are
renamed here, along with the `@PreviewParameter` reference in each view:
GlobalSearchStateProvider -> GlobalSearchStatePreviewParam and
SendFailureDialogStateProvider -> SendFailureDialogStatePreviewParam.

Everything else merged textually. No production class extending
PreviewParameterProvider is left with a `Provider` name, and no reference
to any of the 194 renamed names survives outside the CHANGES.md entry that
records a past pull request title.
2026-08-24 10:55:40 +03:00
Benoit Marty 16954bb66e Merge pull request #7449 from hayaksi1/fix/4112-wildcard-mime-type
Send a concrete mime type for media shared with a wildcard one
2026-08-24 09:41:18 +02:00
Benoit Marty 4c4cdd1678 Merge branch 'develop' into fix/6371-save-file-name-conflicts 2026-08-24 09:38:35 +02:00
Benoit Marty 679c6e4786 Merge pull request #7410 from element-hq/feat/global-search-screen
Feature: global search
2026-08-24 09:34:35 +02:00
Benoit Marty a33a84a684 Merge pull request #7500 from element-hq/feature/account-provider-full-mxid
Let users enter their full Matrix user ID on the account provider screen
2026-08-24 08:24:50 +02:00
Benoit Marty 45d9339bfa Merge pull request #7495 from element-hq/refactor/add-client-enterprise-hooks
Add `ClientEnterpriseHook` and `ClientBuilderEnterpriseHook`
2026-08-22 08:10:50 +02:00
Benoit Marty 277dd4a2fd Fix test compilation 2026-08-21 18:53:43 +02:00
Benoit Marty e271a6b4a8 Revert change on dependencies 2026-08-21 18:13:44 +02:00
Jenna Vassar 2182840a71 Let users enter their full Matrix user ID on the account provider screen 2026-08-21 08:53:23 -07:00
Jorge Martín c56bb66307 Fix ClientBuilderEnterpriseHook not returning an updated ClientBuilder 2026-08-21 17:32:45 +02:00
Benoit Marty eeaf0166f5 Merge pull request #7443 from hayaksi1/fix/4519-hide-verification-fallback
Do not render in-chat key verification requests in the timeline
2026-08-21 16:52:58 +02:00
Benoit Marty 1300112edc Merge pull request #7453 from hayaksi1/fix/4639-system-theme
Apply the system theme when switching back to it from a forced light or dark theme
2026-08-21 12:18:52 +02:00
Jorge Martin Espinosa 614619e306 Make PIP react to camera orientation changes in the other participant's device (#6951)
* Make PIP react to camera orientation changes in the other participant's device

Adds a `controls.onPipMediaOrientationUpdate` callback for the WebView that will trigger a new `pipParamsBuilder.setAspectRatioFromOrientation(orientation)` method

* Fix warning about `PictureInPictureParams.Builder.setAspectRatio` only being available on API 26+
2026-08-21 09:47:49 +00:00
Benoit Marty 2b3aeee1c6 Merge pull request #7494 from element-hq/feature/bma/loginWording
Move strings to the login module
2026-08-21 10:06:21 +02:00
Jorge Martín 4b32816b32 Add ClientEnterpriseHook and ClientBuilderEnterpriseHook
These allow us to not expose the enterprise internal when setting up custom configs for both `ClientBuilder` and `Client`
2026-08-21 10:05:00 +02:00
Benoit Marty be124610f0 Reuse the existing FakeOAuthActionFlow in RootFlowNodeTest
RootFlowNodeTest was declaring its own no-op fake, while the oauth test
module already provides one. Use it, and move it out of the customtab
package, since it is not specific to the custom tabs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:28:22 +02:00
Benoit Marty f0e575e25e Move the fake entry points of RootFlowNodeTest to the test modules
The fakes were declared in RootFlowNodeTest, so other tests could not use
them. Move each of them next to the API it fakes, following the existing
convention of a createNodeResult lambda defaulting to lambdaError():

- FakeLoginEntryPoint in features/login/test
- FakeBugReportEntryPoint in features/rageshake/test
- FakeSignedOutEntryPoint in features/signedout/test (new module)
- FakeAccountSelectEntryPoint in libraries/accountselect/test (new module)

The login and rageshake test modules did not have Appyx on their
classpath, so add the architecture module to their dependencies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:11:00 +02:00
Jorge Martín be2909bca2 Add a global search screen, which reads from both the RoomListSearchDataSource for the rooms search and MessageSearchService for the message search
Note the designs and texts of this screen are temporary.
2026-08-20 13:55:45 +02:00
Jorge Martín 9d36c8c4ed Export missing MessageSearchService to SessionScope 2026-08-20 13:53:49 +02:00
hayaksi1 c239190994 Merge develop into the wildcard mime type branch
Develop gained resolveImageMimeType, which reads the image header so a
share that declares a broad type is encoded as the format it really is.
Resolving the wildcard first would hand that helper a concrete image/jpeg
and make it return early, so a transparent PNG shared as image/* would be
flattened and an animated GIF would be recompressed. The header is now
read from the type the sender declared and the default subtype is applied
to whatever comes back, so the sniffing still runs and an undecodable file
no longer keeps a wildcard.

A non-image shared as image/* is therefore sent as image/jpeg rather than
image/*, which is the whole point of this branch, so the test covering
that case now expects the default subtype.
2026-08-20 14:26:57 +03:00
hayyaksi 2525019ca1 Show the right image when opening one that has not finished sending (#7359)
* Show the right image when opening one that has not finished sending

* Reuse the timeline media gallery for events that have no event id
2026-08-20 11:16:13 +02:00
hayyaksi 918015b8bb Stop waiting for a room alias that the remote server never resolves (#7446)
Tapping a room alias whose server is down left the resolver screen on a
spinner for as long as the screen stayed open, with no way forward other
than going back.

Bound the resolution with the ten second timeout already used when
joining a room by address, so the retry dialog is shown instead. The fake
client's resolve lambda becomes suspending so a server that never answers
can be simulated.
2026-08-20 09:34:15 +02:00
hayyaksi c362bca527 Keep the send button when the composer is emptied while editing a message (#7456)
* Keep the send button when the composer is emptied while editing

rememberEndButtonParams checked whether the composer had sendable text
before it checked whether the user was editing a message, so clearing
the text of a message being edited replaced the send button with the
voice recorder button. Starting a recording from there abandons the
edit.

Check the editing branch first, as the formatting composer already does,
and let it render a disabled send button when there is nothing to send.

* Update screenshots
2026-08-20 08:55:50 +02:00