Commit Graph

16399 Commits

Author SHA1 Message Date
Benoit Marty 8972098b4f Merge pull request #7935 from element-hq/feature/bma/fixBadRoomId
Fix invalid room id built from thread notification tags
2026-10-15 23:05:18 +02:00
ElementBot 4ebcf960ce Update Matrix Rust SDK to 26.10.14-nightly (#7930)
* Update Matrix Rust SDK to 26.10.14-nightly

* `withSearchIndexStore` now uses `key` instead of passphrase

* Fix `RustMatrixClient` now returning `searchIndex` size too

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-10-15 16:47:56 +02:00
Jorge Martin Espinosa 287001f9aa Prevent foreground backfill from running when the app is active (#7932)
* Prevent foreground backfill from running when the app is active

This should be a background task, since it can severely degrade performance if the app is in use while it runs.

The worker won't run any more if the app is in foreground and will stop running if it was in background and now it's in foreground.

* Fix return inside `withTimeout`

Co-authored-by: Benoit Marty <benoitm@element.io>

* Remove initial delay: it shouldn't be necessary if the foreground state of the app is checked when the worker starts

Instead, if the app was in foreground, cancel the work and retry in 5 minutes.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-10-15 16:09:09 +02:00
ganfra 8689961f0d Merge pull request #7936 from element-hq/feature/fga/fix-pill-rendering
Fix mention pill overflowing the end of the line when too wide
2026-10-15 15:16:57 +02:00
Benoit Marty 9ac71fd35d Fix room id parsing from notification tags
Thread notification tags have the form "roomId|threadId". clearReadRoomsNotifications
was building a RoomId from the whole tag, which is only validated in debug builds, so
in release an invalid room id reached RoomListService.room(). Add
NotificationCreator.getMessageNotificationRoomId(), the inverse of messageTag(), which
only keeps the part before '|' and checks it is a valid room id.

Also make RoomListServiceInterface.roomOrNull take a RoomId instead of a String.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 12:56:46 +02:00
ganfra c27bbaa1f6 Fix mention pill overflowing the end of the line when too wide 2026-10-15 12:54:25 +02:00
Benoit Marty e1b9ba21dc Merge pull request #7929 from element-hq/renovate/com.google.firebase-firebase-bom-35.x
Update dependency com.google.firebase:firebase-bom to v35
2026-10-15 10:53:04 +02:00
renovate[bot] 70151591e2 Update dependency com.google.firebase:firebase-bom to v35 2026-10-14 22:42:17 +00:00
Benoit Marty f62f5be16c Merge pull request #7922 from element-hq/feature/bma/otherAccountUnreadCount
Show the unread count of the other accounts in the multi-account section
2026-10-14 21:30:36 +02:00
Benoit Marty a3fa7aeedd Merge branch 'develop' into feature/bma/otherAccountUnreadCount
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 20:15:02 +02:00
ganfra 7fe10b32b0 Merge pull request #7905 from element-hq/feature/fga/timeline-multi-forward-ay11
Improve accessibility of timeline selection mode
2026-10-14 18:56:38 +02:00
Benoit Marty 0cf2eeb931 Merge pull request #7904 from element-hq/feature/bma/swipeAvatarAnnouncement
Announce the swipe gesture on the account avatar to switch account
2026-10-14 18:19:48 +02:00
Benoit Marty 9efe0db570 Dismiss the swipe avatar announcement in the app coroutine scope
HomeView sends HomeEvent.DismissSwipeAvatarAnnouncement right before switching account. Switching
account replaces the LoggedInFlow root node, which destroys HomePresenter and cancels its
composition coroutine scope, so the dismissal could be cancelled before the announcement status
was stored. Use the app coroutine scope instead, which survives the account switch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 18:00:56 +02:00
ElementBot c3f178985d Update screenshots 2026-10-14 16:00:19 +00:00
Benoit Marty e186e62a0e Move RoomListBanner to its own file
The test source set also has a RoomListState.kt file in the same package, so its RoomListStateKt
class was shadowing the one of the main source set, and the toRoomListBanner() functions were
not found when running the tests (NoSuchMethodError).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 17:41:07 +02:00
Benoit Marty 56623b8a7f Merge branch 'develop' into feature/bma/swipeAvatarAnnouncement
Account switching is now handled by RootFlowNode, through the onSwitchToAccount callback, instead
of HomeEvent.SwitchToAccount. To keep dismissing the swipe avatar announcement when the user
switches account by swiping their avatar, HomeView now also sends the new
HomeEvent.DismissSwipeAvatarAnnouncement.

Also opt in to ExperimentalCoroutinesApi in the HomePresenter tests using advanceTimeBy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 17:39:24 +02:00
Benoit Marty 2a048a5ee5 Merge pull request #7918 from element-hq/feature/bma/iterateOnAddAccountUi
Add a back button to the server screen and iterate on the identity confirmation screen
2026-10-14 17:16:35 +02:00
Benoit Marty 24eee458d2 Merge pull request #7923 from element-hq/feature/bma/ciContinue
Let the CI report all the failing tests and code quality issues
2026-10-14 17:16:13 +02:00
Benoit Marty 5a5d631a8d Animate all the banner changes of the room list in a single slot
Replace DismissibleBanner, which used one AnimatedVisibility per banner, by RoomListBannerSlot,
which renders the banner to display with a single AnimatedContent. All the changes are now
animated: dismissing a banner, replacing a banner by the next one, and displaying a new banner.
Previously, when a banner was dismissed, the next banner was displayed without animation.
The dismiss event is now sent immediately, AnimatedContent keeps rendering the dismissed banner
while it animates out.

The banner slot of the LazyColumn now has a min height of 1px. When it was 0px high, the
LazyColumn was considering it as not visible and moved the first visible item to the first room,
so a new banner was added above the visible area of the list.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 17:04:32 +02:00
Benoit Marty c19dfd1db6 Merge pull request #7901 from element-hq/feature/bma/mainThreadBlocking
Avoid blocking the main thread in several places
2026-10-14 16:39:14 +02:00
ganfra 34a075db9c Merge pull request #7913 from element-hq/renovate/sqldelight
Update sqldelight to v2.4.1
2026-10-14 15:27:20 +02:00
Benoit Marty faa7956b93 Fix flaky NotificationSettingsPresenterTest after loading distributors off the main thread
The distributors are now loaded on the IO dispatcher, which was a StandardTestDispatcher in the test, so the initial state could be read before they were loaded. Use an unconfined test dispatcher so that they are loaded deterministically.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 14:46:15 +02:00
Benoit Marty 2bec8e1487 Let Gradle continue after a task failure in CI checks
Add --continue to the unit tests, screenshot tests, detekt and ktlint
Gradle invocations, so that a failure in one module does not prevent
the other modules from being checked, and the CI reports all the
failures at once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 14:46:05 +02:00
ElementBot c62c1491bc Update screenshots 2026-10-14 14:32:50 +02:00
Benoit Marty 095fda3d9e Add MatrixClient.totalUnreadCountFlow() extension
Extract the logic to observe the total unread count of a MatrixClient, refreshed on each sync
heartbeat, to a shared extension and use it in HomePresenter and PreferencesRootPresenter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 14:31:31 +02:00
renovate[bot] 1c500374c1 Update actions/upload-artifact action to v7.0.2 (#7921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-14 12:25:19 +00:00
Benoit Marty 0e6bc91e9d Merge pull request #7917 from element-hq/feature/bma/switchSessionInRootFlowNode
Handle account switch in RootFlowNode instead of in presenters
2026-10-14 14:19:58 +02:00
Benoit Marty d00d32e98a Merge pull request #7915 from element-hq/feature/bma/doNotMixMapTilerConfigs
Do not mix the homeserver MapTiler config with the build time one
2026-10-14 14:19:22 +02:00
Jorge Martin Espinosa 3ef59a8910 Don't log OkHttp binary bodies in debug builds (#7919)
This is mostly done when uploading bug reports and on one hand, it doesn't really make sense since the binary contents will be unreadable anyway, and on the other it also messes up with our debug tools, making debugging some issues harder.
2026-10-14 12:04:07 +00:00
Benoit Marty b37f1d5b71 Show the unread count of the other accounts in the multi-account section
In the settings screen, when the other accounts section is expanded, display a counter with the
total number of unread notifications for each non-active account. The count is read from the
account's MatrixClient (if in memory) and refreshed on its sync heartbeat.

Part of #7769

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 12:33:14 +02:00
ElementBot be98d04f40 Update screenshots 2026-10-14 10:26:25 +00:00
Benoit Marty 933fc54e12 Iterate on add account onboarding UI. 2026-10-14 12:03:14 +02:00
Benoit Marty 6a516a02ae Iterate on the identity confirmation screen
Follow the multi-account design for the "Confirm your digital identity"
screen: use the dedicated "Sign out" string for the top bar action and add
a leading icon to the "Use another device" button.

Add a test to check that clicking on "Sign out" emits the expected event.

Part of #7768

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 11:56:28 +02:00
Benoit Marty f72af72d80 Add a back button to the account provider confirmation screen
The screen where the user enters the server address only supported the
system back gesture. Add a top app bar with a back button, consistent with
the screen to choose the account provider and FlowStepPage, so the user can
navigate back from it, especially when adding another account.

Part of #7768

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 11:35:13 +02:00
Jorge Martin Espinosa 566eb1f4f3 Use local SDK library for EC native too (#7916)
When a local SDK AAR file is present, ignore the version needed by the Element Call Matrix library.

This allows us to test local SDK builds.
2026-10-14 11:14:38 +02:00
Jorge Martin Espinosa 241f8e67bd Fix side-effects when tapping on a link in the new renderer (#7906)
The case where we move the pointer once we've started the click on a link wasn't taken into account, so the click or long click gestures weren't canceled if the gesture ended up being a 'move' one.

Simplify the handler and make it more idiomatic too.
2026-10-14 11:13:59 +02:00
Jorge Martin Espinosa 8a5c50d2b8 Fix File.getSizeOfFiles() double counting some files (#7907)
The `File.length()` docs state:

> Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory.

On Android, it *seems* to currently have the right behaviour, summing up the size of its children, which made `File.getSizeOfFiles()` double-count the size of some directories.

To avoid this, and be able to control the actual behaviour no matter what future Android versions do, let's count those ourselves.
2026-10-14 11:13:14 +02:00
Benoit Marty 6c1cc4e3f7 Handle account switch in RootFlowNode instead of in presenters
PreferencesRootPresenter and HomePresenter were updating the latest session
in the session store directly, relying on RootNavStateFlow to trigger the
navigation as a side effect. Changing the current session is app-level
navigation, so it is now forwarded through a new `navigateToSession` callback
up to RootFlowNode, which performs the session store update.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 10:37:15 +02:00
Benoit Marty 799f60b955 Generate null MapTiler BuildConfig values when not provided
Remove the default values from the Gradle file, the public MapTiler defaults
are now only defined in MapTilerDefaults. buildConfigFieldStr now accepts a
null value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 10:11:08 +02:00
Benoit Marty 0149e6f65b Do not mix the homeserver MapTiler config with the build time one
The map URL builders now only use the MapTilerConfig they are given, falling
back to the public MapTiler defaults for the missing values, instead of the
values defined at build time. This avoids for instance sending the build time
API key to a tile server provided by the homeserver.

When there is no config, no static map URL builder is created, so no request
is performed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 10:11:07 +02:00
renovate[bot] 9b3a9a0a2d Update dependency io.element.android:element-call-embedded to v0.28.0 (#7912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-14 09:49:35 +02:00
Benoit Marty 80cfc2be8d Merge pull request #7911 from element-hq/feature/bma/disableLocationSharingWithoutMapTiler
Disable location sharing when no MapTiler config is available
2026-10-14 09:43:52 +02:00
Jorge Martin Espinosa 213ed22cad Bump SDK bindings to 26.10.12-nightly (#7909)
* Bump SDK bindings to `26.10.12-nightly`

* Fix API breaks in SDK bindings

* Fix doc comment
2026-10-13 22:28:22 +02:00
ElementBot cff4562b79 Update screenshots 2026-10-13 18:15:31 +00:00
renovate[bot] b84cf2aced Update sqldelight to v2.4.1 2026-10-13 17:56:01 +00:00
Benoit Marty 4b97d6ab96 Disable location sharing when no MapTiler config is available
LocationService now exposes the MapTiler config to use: the one provided by the
homeserver takes precedence over the build time one, and null means that no map
provider is configured. It is now session scoped, and isServiceAvailable()
returns a StateFlow derived from this config.

When no config is available:
- the location sharing option is hidden from the composer, and location events
  cannot be opened in the location viewer;
- the "Location sharing" entry is hidden from the settings;
- location events in the timeline render a placeholder, without performing any
  request to MapTiler.

The show and share location screens now get the config from LocationService
rather than fetching the homeserver config by themselves.

Closes element-hq/element-android-enterprise#69

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 17:15:37 +02:00
ganfra 9e12ec7505 Improve accessibility of timeline selection mode 2026-10-13 14:45:00 +02:00
Benoit Marty 5104e044ff Merge pull request #7862 from element-hq/renovate/kotlin
Update dependency org.jetbrains.kotlinx:kover-gradle-plugin to v0.9.11
2026-10-13 13:01:19 +02:00
Jorge Martin Espinosa 9cc5cf9a01 Add total unread notification count to home screen (#7891)
* Add total unread notification count to home screen

This will be calculated on each sync heartbeat (for now, using the state updates for the room list service).

* Simplify `counter` parameter logic

* Read the total unread count when the home screen is first displayed

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-10-13 10:58:07 +00:00
Benoit Marty f187409db3 Apply suggestion: 'rangeTo' or the '..' call should be replaced with '..<' 2026-10-13 12:55:50 +02:00