1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00

864 Commits

Author SHA1 Message Date
Benoit Marty
463adaac20 Merge pull request #7964 from element-hq/sync-localazy
Sync Strings
2026-10-20 15:32:02 +02:00
ganfra
d39249e241 Merge pull request #7961 from element-hq/feature/fga/multi-account-user-status
Render user status of other accounts in settings
2026-10-20 13:53:57 +02:00
bmarty
bfde1cc8a6 Sync Strings from Localazy 2026-10-20 09:46:25 +00:00
Benoit Marty
b3c05db9a1 Merge pull request #7941 from element-hq/feature/bma/iterateNotificationSettings
Iterate on the Notification settings screen to match the design
2026-10-20 11:11:14 +02:00
ganfra
288c9df8a7 Render user status of other accounts in settings 2026-10-20 11:05:25 +02:00
Benoit Marty
ce9c5765b3 Use parameterized tests for NotificationSettingsView toggles
Replace the pairs of true / false toggle tests and their private helpers by
single tests taking a @TestParameter initialState.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 17:21:04 +02:00
Benoit Marty
764078c6f0 Add missing NotificationSettingsView preview states and rework factories
Add previews for the uninitialized state, the activity / invite / @room switches,
other room notification modes, the message sound dialog with a custom sound and a
single failing push distributor. Group the preview states by screen section.

Each factory now takes exactly the parameters of the object it builds
(aNotificationSettingsState, aValidMatrixSettings, anInvalidMatrixSettings,
anAppSettings, aSoundChannelUiState), and the default message sound display name
matches the default sound.

Fix the push provider test, which needs 2 distributors for the advanced settings
to be displayed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 17:10:09 +02:00
Benoit Marty
4aa9f82761 Improve preview of NotificationSettingsView 2026-10-15 16:59:09 +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
Benoit Marty
487787425f Use PreviewWithExtraLargeHeight 2026-10-15 16:27:52 +02:00
Benoit Marty
8b25f88409 Create composable functions to clarify the code. 2026-10-15 16:08:24 +02:00
Benoit Marty
bfd67862d8 Iterate on Notification settings view to match Figma https://www.figma.com/design/pDlJZGBsri47FNTXMnEdXB/Compound-Android-Templates?node-id=4294-54110
Closes #7870
2026-10-15 15:15:26 +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
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
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
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
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
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
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
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
Benoit Marty
865cca6764 Load the push distributors off the main thread in the notification settings
Getting the distributors queries the PackageManager and the Play Services, it was done during the first composition of the screen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 14:33:17 +02:00
Benoit Marty
8912341439 Avoid database access on the main thread when opening the settings
`getUserProfile()` was storing the user profile (DB read, avatar Base64 encoding, DB write) on the caller
dispatcher, i.e. the main thread when called from a presenter, causing glitches in the screen transition.
- Run the whole `getUserProfile()` on the session dispatcher.
- Make `DatabaseSessionStore` main-safe by running the queries on the IO dispatcher.
- Do not refresh the profile twice from the settings screen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 10:42:19 +02:00
bmarty
8100fa6555 Sync Strings from Localazy 2026-10-12 00:37:35 +00:00
Benoit Marty
dc031dd0e6 Move SessionData.toMatrixUser() extension to a common place, then use it across the codebase. 2026-10-07 15:50:05 +02:00
Jorge Martin Espinosa
3944cb3bfc Fix toggling 'show all activity in room list' not working (#7871)
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.
2026-10-07 10:09:25 +02:00
ganfra
2cda8a0315 Merge pull request #7851 from element-hq/sync-localazy
Sync Strings
2026-10-06 13:30:00 +02:00
Benoit Marty
08a0885cfc Merge pull request #7821 from element-hq/bma/removeUnusedDependencies
Remove unused Gradle dependencies
2026-10-06 12:23:32 +02:00
Benoit Marty
2de0d78ced Import multi-account announcement strings from Localazy
Add the `screen.multi_account_announcement.*` keys to the home module
Localazy configuration and import the latest strings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 09:05:27 +02:00
Benoit Marty
b9ed090400 Use only ClipboardHelper to copy to the clipboard, and do not render feedback on Android 13+
Since Android 13, the system displays its own confirmation when content
is copied to the clipboard, so the application does not render its own
Toast or Snackbar anymore on those versions.

Context.copyToClipboard, CopyToClipboardUseCase and the direct
ClipboardManager usage in EventDebugInfoView are removed.
ClipboardHelper.copyPlainText(text, isSensitive, onSuccessOnOldDevice)
is now the only entry point, and AndroidClipboardHelper is the only
class using ClipboardManager.

Copy actions from the views are moved to their Presenter through new
events, or to the Node when there is no Presenter. A ToastHelper is
introduced so that Toasts are kept where they were used before.
Snackbars are kept where they were already used.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 11:40:08 +02:00
bmarty
50460ad031 Sync Strings from Localazy 2026-10-05 00:40:51 +00:00
Benoit Marty
954eb731e7 Remove unused Gradle dependencies
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>
2026-10-02 15:47:48 +02:00
Jorge Martin Espinosa
2dd0a47eb4 Allow displaying only unread notifications (#7803)
* 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>
2026-10-01 19:46:01 +02:00
Benoit Marty
84a6586551 Merge pull request #7337 from element-hq/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.5.0-alpha29
2026-09-30 12:14:14 +02:00
Benoit Marty
4c4389b29a Remove unnecessary Material3 experimental opt-ins
Many Material3 APIs are now stable, so the `ExperimentalMaterial3Api` and `ExperimentalMaterial3ExpressiveApi`
opt-ins are not required anymore at those places. Also remove the propagating `@ExperimentalMaterial3Api`
marker from `TopAppBarScrollBehaviorLayout`, which does not use experimental API anymore.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 18:45:30 +02:00
Benoit Marty
d4c1bb61bb Always open the sign out screen from the settings
Remove the direct logout dialog from the settings and from the home screen, where it was never triggered.
The sign out screen will later display the account information (#7765).
The direct logout is still used in the FTUE session verification screen, so remove only the now unused `canDoDirectSignOut` field.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 15:57:04 +02:00
Benoit Marty
00bfb97b92 Merge pull request #7784 from yncyrydybyl/fix/link-new-device-navigation
Fix "Link new device" opening the "Add an account" screen
2026-09-28 14:59:52 +02:00
Benoit Marty
6d717ff745 Merge pull request #7793 from element-hq/feature/bma/storeUserAvatar
Display the avatar of other accounts even if it cannot be loaded from the current account
2026-09-28 12:43:03 +02:00
Benoit Marty
c2a2e16f46 Use the stored avatar thumbnail as a fallback for other accounts
Add an optional thumbnail to `MatrixUser` and `AvatarData`, filled from the session
database for the other accounts in the room list header, the settings and the account
selection screen. `ImageAvatar` renders this thumbnail instead of the initial letter while
the avatar is loading or when it fails to load, for instance when the homeserver of the
current account is not federated with the one of the other account.

Fixes #5571

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 11:38:45 +02:00
ElementBot
c8c242476b Sync Strings (#7787)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-09-28 11:32:40 +02:00
Yan Minagawa
83a01eb880 Send "Link new device" to the link-new-device flow again
PreferencesFlowNode routed navigateToLinkNewDevice() to
callback.navigateToAddAccount(), so tapping "Link new device" under
Account settings opened the "Add an account" screen instead — the
opposite direction, signing an extra account into this device rather
than authorising a new one.

The correct destination was already implemented and simply unreachable:
LoggedInFlowNode handles navigateToLinkNewDevice() by pushing
NavTarget.LinkNewDevice. Call that instead.

Regression from 9b2577f1dd ("Split settings: app settings / account
settings"); the previous code called callback.navigateToLinkNewDevice().
It went unnoticed because FeatureFlags.QrCodeLogin defaults to false,
which hides the entry point on default builds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y1etzTCPzowrNcPyRBdjm
2026-09-26 16:48:46 +02:00
Benoit Marty
01681e9fff Move the "Blocked users" item to the Moderation and safety screen.
The item is removed from the account section of the root settings screen and
added at the bottom of the Moderation and safety screen. As before, it is only
shown when at least one user is blocked, with the number of blocked users.

ModerationAndSafetyPresenter now computes the number of blocked users, and
ModerationAndSafetyNode exposes a Callback to navigate to the blocked users
screen. Tests are moved accordingly.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 16:17:26 +02:00
Benoit Marty
c612c80b1d Merge account settings into the root preference view. 2026-09-23 16:03:15 +02:00
Benoit Marty
2669ac4eae Change to "produceState" 2026-09-23 11:55:03 +02:00
Benoit Marty
c8748f4d77 nbOfBlockedUsers -> numberOfBlockedUsers 2026-09-23 11:51:54 +02:00
Benoit Marty
ac54596ca3 Update Maestro tests 2026-09-22 16:43:58 +02:00
Benoit Marty
e688b174fa Merge branch 'develop' into bma/settingsIterationStep2Bis 2026-09-22 14:47:40 +02:00
Benoit Marty
9b3d4c7c27 Merge pull request #7736 from element-hq/sync-localazy
Sync Strings
2026-09-22 14:45:58 +02:00
Benoit Marty
d29368cdf1 Add missing ElementPreview wrapper 2026-09-22 14:12:03 +02:00
Benoit Marty
872bf5a70f Let Claude update the tests. 2026-09-22 13:17:35 +02:00
Benoit Marty
9b2577f1dd Split settings: app settings / account settings 2026-09-22 13:17:16 +02:00