Commit Graph

16391 Commits

Author SHA1 Message Date
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
ElementBot 0dce4b9e49 Update screenshots 2026-10-13 10:11:22 +00:00
Benoit Marty 8923ba1e1b Animate the dismissal of the banners in the room list
Add DismissibleBanner, which makes a banner shrink and fade out when it is dismissed, and
invokes the dismiss callback when the animation is over, so that the banner is removed from
the list when its height is 0. Apply it to all the dismissible banners of the room list.

The banners are now rendered in a slot which is always the first item of the room list, so
that the rooms, which do not have a key, keep the same index and the scroll position is
preserved when a banner is removed. The visible range of rooms sent to the SDK does not
include this slot anymore.

FullScreenIntentPermissionBanner and BatteryOptimizationBanner now take callbacks instead
of their state, like the other banners.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 11:45:01 +02:00
Benoit Marty 14710599a7 Announce the swipe gesture on the account avatar
Display a banner on the room list when 2 or more accounts are logged in, to let the user know
that they can swipe their avatar to switch account. The banner is stored as a new
Announcement.SwipeAvatarToSwitchAccount, and is dismissed when the user taps on it, or when
the user switches account by swiping their avatar.

The banner is displayed at the same place as the new notification sound banner, but never
at the same time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 11:44:44 +02:00
Benoit Marty 50aa723f63 Merge pull request #7899 from element-hq/feature/bma/multiAccountDeviceVerification
Show account information on the identity confirmation screen
2026-10-13 11:31:13 +02:00
Benoit Marty ffe8f4a14e Merge pull request #7900 from element-hq/feature/bma/settingsMainThreadJank
Fix animation glitches when opening the settings
2026-10-13 11:30:36 +02:00
ElementBot 092cded211 Update Matrix Rust SDK to 26.10.07-nightly (#7880)
* Update Matrix Rust SDK to 26.10.07-nightly

* Adapt to the new QR code login task API

`generate()` and `scan()` of `GrantLoginWithQrCodeHandler` and `LoginWithQrCodeHandler`
now return a task instead of suspending until the flow is over. Wait for the task to
complete, and cancel it if the coroutine is cancelled, so that the flow is also stopped
on the Rust side.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Add tests for the cancellation of the QR code login tasks

Check that cancelling the coroutine of the link new device handlers and of the QR code
login cancels the task returned by the SDK, so that the flow is stopped on the Rust side.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Fix import ordering in the link new device handler tests

ktlint expects the imports to be sorted in lexicographic order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 11:21:21 +02:00
Benoit Marty 3170ff4422 Remove useless Unit type. 2026-10-13 10:42:05 +02:00
Benoit Marty 259fc222da Import strings for the swipe account banner 2026-10-13 09:45:23 +02:00