Commit Graph

3889 Commits

Author SHA1 Message Date
Benoit Marty
cfa48d1df7 Annotate Composable function with ReadOnlyComposable where it's possible. (#4859) 2025-06-11 14:12:54 +02:00
Jorge Martin Espinosa
cfb9cc3edc Fix for message composer losing focus in Compose 1.8.0 (#4853)
Co-authored-by: ElementBot <android@element.io>
2025-06-10 16:39:26 +00:00
ganfra
2b318277c6 deps (matrix rust sdk) : bump version to 25.06.10 2025-06-10 16:01:20 +02:00
夜坂雅
91b925c3ee feat: Support matrix: links (#4839) 2025-06-09 16:40:45 +02:00
Jorge Martin Espinosa
55805bcfee Element Call: Add audio output selector handled by Android (#4663)
- Add onUrlLoaded callback to WebViewWidgetMessageInterceptor
- Add WebViewAudioManager component and use it instead of the AudioManager extension functions
- Enable controlling the audio devices in Element Call from the OS instead of automatically detecting them
- Simplify the window flags in ElementCallActivity
- Work around the issue where the default audio device wasn't using the right audio stream
- Add onAudioPlaybackStarted, use it to start the audio-device related logic
2025-06-09 09:12:53 +02:00
ganfra
31137fd20e misc (matrix) : use innerClient.subscribeToRoomInfo sdk method (#4838) 2025-06-09 09:10:38 +02:00
ganfra
a1b77c920a Merge pull request #4834 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-25.x
fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.6.6
2025-06-06 18:55:06 +02:00
Jorge Martin Espinosa
35ecbd9324 Log the push resolving failure reason if available (#4835) 2025-06-06 16:06:46 +00:00
ganfra
463c78d7b6 deps (rust sdk) : handle breaking changes of version 25.06.06 2025-06-06 18:01:59 +02:00
Benoit Marty
75d81b13e9 Let the SDK set a correct extension to downloaded file by providing a full mimetype when a base mimetype is available. (#4830)
Fixes #4803
2025-06-06 12:34:06 +02:00
ganfra
45113818eb Merge pull request #4824 from element-hq/feature/fga/fix_identity_change
fix (identity change) :  RoomMemberIdentityStateChange in non encrypted room
2025-06-05 11:16:56 +02:00
renovate[bot]
96063373b7 fix(deps): update coil to v3.2.0 (#4712)
* fix(deps): update coil to v3.2.0

* Fix compilation issue. Need to provide an image for preview.

https://coil-kt.github.io/coil/compose/#previews

* Improve preview for images.

* Update screenshots

* More cleanup

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2025-06-05 09:49:27 +02:00
ganfra
df5e4062ec fix (identity change) : ensure we can configure to observe RoomMemberIdentityStateChange in non encrypted room if needed 2025-06-04 22:27:40 +02:00
renovate[bot]
0ded7f7f34 fix(deps): update telephoto to v0.16.0 (#4749)
* fix(deps): update telephoto to v0.16.0

* Opt in for ExperimentalTelephotoApi

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-06-04 18:07:47 +02:00
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible.

* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00
Benoit Marty
88124cd770 Oidc: Fallback to external browser instead of using Webview (#4808)
* Oidc: Fallback to external browser instead of using Webview

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-06-04 14:25:18 +00:00
Benoit Marty
525870f30d Mark room as fully read when user goes back to the room list. (#2687)
* Remove not helping warning.

* Add and improve tests

* Send the `m.fully_read` read marker when the user navigates back to the room list, to mark the room as read.
2025-06-04 16:14:29 +02:00
Benoit Marty
7a3db35ccb Rename classes overriding classes from the FFI layer. (#4817)
* Rename classes overriding classes from the FFI layer.

* For other Konsist test.
2025-06-04 16:13:57 +02:00
Jorge Martin Espinosa
c02c1ae1bd fix: Make Client.findDM return a Result (#4816) 2025-06-04 08:41:26 +00:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.
2025-06-04 09:02:26 +02:00
renovate[bot]
9d5e8aa308 fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01 (#4631)
* fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01

* Fix autofill deprecations

* Adapt our custom BottomSheetState and scaffold to the new APIs

* Get rid of all the custom bottom sheet implementation

It doesn't seem to be needed anymore 🎉

* Replace `semantics { invisibleToUser() }`  with `hideFromAccessibility()`

* Update screenshots

* Add commit and cancel callbacks for autofill on the login view

* Fix broken tests caused mainly by https://issuetracker.google.com/issues/366255137

Add `LocalUiTestMode` composition local and helper functions.

* Remove dependency that caused a new license to need to be approved

* Let setSafeContent handle setting the value for LocalUiTestMode

* Fix broken test

* Apply fix to RoomMemberModerationViewTest and RoomListDeclineInviteMenuTest

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-06-03 21:05:43 +00:00
ganfra
827a577f4c change (room member moderation) : sync translations 2025-06-03 14:00:55 +02:00
ganfra
cfbbccb09d Merge branch 'develop' into feature/fga/user_moderation_bottomsheet 2025-06-03 10:46:12 +02:00
ganfra
3667c4a9fa Merge pull request #4799 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-25.x
fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.5.29
2025-06-02 21:58:33 +02:00
ganfra
45369e6910 dependencies (rust sdk) : replace RoomTombstone by SuccessorRoom 2025-06-02 20:33:34 +02:00
Jorge Martin Espinosa
9dbaa2ed40 Make sure HeaderFooterPage can contents be scrolled (#4704)
Co-authored-by: ElementBot <android@element.io>
2025-06-02 14:28:46 +02:00
ElementBot
5a8919b6e3 Sync Strings from Localazy (#4804)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-06-02 12:05:08 +02:00
Benoit Marty
0b5e816f0d Cleanup testImplementation dependencies (#4790) 2025-06-02 10:51:02 +02:00
ElementBot
498cf15d38 Sync Strings (#4775) 2025-05-30 08:47:39 +00:00
ganfra
b25f9571f2 Merge branch 'develop' into feature/fga/fix_left_room_membership_change 2025-05-27 22:08:17 +02:00
Benoit Marty
cf17d93580 Stronger lambda error (#4771)
* Make sure lambdaError() make the test fail in all circumstances.

* Fix existing errors on tests.

* Uniformize the way we are creating class under test.

* Cleanup

* Fix typo

* Fix failing test after rebase.
2025-05-27 15:32:09 +00:00
Benoit Marty
c86154d120 Hide Element Call entry point if Element Call service is not available. (#4783)
* Hide Element Call entry point if Element Call service is not available.

* No need to preview the case RoomCallState.Unavailable

* Hide start call action from user profile if Element Call is not available.

* Add mising `use` and cover the problem by a test.

* Update screenshots

* Update enterprise submodule ref.

* Ensure `enterpriseService.isElementCallAvailable()` is not called several times.
And fix unit tests on CI

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-27 16:31:05 +02:00
renovate[bot]
dd95557782 fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.5.26 (#4781)
Adapt SDK changes:
- `RoomListItem` is gone, we should use `Room` now.
- `SyncService.withUtdHook` has been replaced with `Client.setUtdDelegate`.
- `ClientDelegate.didRefreshTokens` has been removed. It wasn't in use since a long time ago.
- `TracingConfiguration` for the SDK now contains a `sentryDsn` parameter.

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-05-27 11:29:40 +02:00
Jorge Martin Espinosa
f8d7b4dfc9 Notification events resolving and rendering in batches (#4722)
- Use `NotiticationService.getNotifications()` function so we resolve the events in bulk.
- Added `NotifierResolverQueue` to group the notifications to resolve based on a debounce strategy.
- Batch rendering of these events as notifications.
2025-05-26 17:10:20 +02:00
renovate[bot]
5ec485911e fix(deps): update sqldelight to v2.1.0 (#4735)
* fix(deps): update sqldelight to v2.1.0

* Ignore new returned value from database query which know have type QueryResult<Long>.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-26 14:58:57 +02:00
Benoit Marty
819d9c7da0 Update UnifiedPush library (#4358)
* Upgrade `com.github.UnifiedPush:android-connector` from 2.4.0 to 3.0.4

* Do not use jitpack to get the unified push library

* implementation is ok

* Exclude com.google.crypto.tink to fix a compilation issue

* Fix tests.

* Update log.

* Revert "Exclude com.google.crypto.tink to fix a compilation issue"

This reverts commit f431ebe3b78a06282e0ee74c9f428702d463df45.

* Fix compilation issue after rebase.

* Exclude com.google.crypto.tink again.

* Try version 3.0.8

* Use latest version 3.0.9

* Replace tink exclusion with dependency resolution

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2025-05-26 14:56:54 +02:00
Jorge Martin Espinosa
c67089edf7 Add ActiveRoomsHolder to manage the active rooms for a session (#4758) 2025-05-26 11:03:55 +00:00
夜坂雅
b39100ef6f fix: Ignore global proxy settings if system thinks there's none (#4744)
Otherwise a :0 proxy would break in Rust SDK.
2025-05-26 09:33:04 +02:00
Benoit Marty
dbe75cd4ea On boarding flow: add a screen to select account provider among a fixed list (#4769)
* Hide login with QrCode when the app is opened by a link

* Fix UI on ChangeAccountProviderView.

* Add flow to choose between a fixed list of account provider

* Update screenshots

* Fix licence header

* Rename preview.

* Ensure that the default account provider cannot be "*"
This should not happen IRL, but better be robust against issue in application configuration.

* Create const of any account provider value

* Fix typo

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-23 18:36:48 +02:00
ganfra
03e1926e14 Merge branch 'develop' into feature/fga/user_moderation_bottomsheet 2025-05-23 17:28:48 +02:00
ganfra
198bff9915 fix (left room membership) : use correct membership change and add test 2025-05-22 21:41:44 +02:00
ganfra
b0c95db0de change (member moderation) : sync strings 2025-05-21 18:30:45 +02:00
Benoit Marty
f20caebdcb Add support for login link (#4752)
* Add support for login link

https://mobile.element.io/element?account_provider=example.org&login_hint=mxid:@alice:example.org

* Update screenshots

* Reduce code duplication

* Add test on OnBoardingPresenter

* Fix tool

* Ignore login parameter if user is not allowed to connect to the provided server.

* Improve tests.

* Cleanup

* Revert change on Project.xml.

* Add documentation

* Improve LoginHelper

* Rename LoginFlow to LoginMode

Move LoginFlow to package io.element.android.features.login.impl.login
Rename some implementation of LoginMode
Rename LoginFlowView to LoginModeView

* Change launchMode of MainActivity from `singleTop` to `singleTask`

Using launchMode singleTask to avoid multiple instances of the Activity when the app is already open. This is important for incoming share and for opening the application from a mobile.element.io link.

Closes #4074

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-21 18:19:42 +02:00
renovate[bot]
6d8d758351 fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.5.21 (#4759)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.5.21

* Fix API breaks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-05-21 17:39:58 +02:00
Jorge Martin Espinosa
01abba6205 Use the right live timeline instance in RustRoomFactory (#4745) 2025-05-20 17:33:25 +02:00
Benoit Marty
caf25894d6 Reduce API of JoinedRoom, caller must use the Timeline API from liveTimeline instead. (#4731)
This removes lots of boilerplate code.
2025-05-20 09:07:43 +02:00
ElementBot
90f89b9088 Sync Strings (#4739)
* Sync Strings from Localazy

* Sync strings again

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-19 08:17:02 +00:00
Benoit Marty
3b5d365834 Fix issues on JoinedRoom / BaseRoom (#4724)
* Import type

* Add test to cover an existing issue. roomCoroutineScope is not cancelled when the class is destroyed

* Cancel roomCoroutineScope when the class is destroyed

* Move `isOneToOne` to BaseRoom, we do not need a JoinedRoom for it.

* Let `roomInfoFlow` be implemented by RustBaseRoom.

It should fix a few issues where we rely on the room info to be live, and it was not the case on RustBaseRoom.

* Add more assertions.
The test would fail anyway if roomCoroutineScope was still active, but it's more explicit with these assertions.
2025-05-15 16:08:58 +00:00
Benoit Marty
318f72a78d Ensure the CI is marked as failed when Maestro test is failing (#4700)
* Ensure the CI is marked as failed when Maestro test is failing

* Fix typo in String to disable bookmark in ChromeCustomTab

* Fix Maestro test now that matrix.org is using MAS to authenticate.

* Fix Maestro test - other issues due to recent changes.

* Maestro: add test on Element Call

* Run through Chrome on boarding step.

* Try suggestion from https://github.com/mobile-dev-inc/Maestro/issues/1126#issuecomment-2842220361

* Revert "Try suggestion from https://github.com/mobile-dev-inc/Maestro/issues/1126#issuecomment-2842220361"

This reverts commit d400644622c1a240deb61040f9095e3221e07f21.

* Add comment on Maestro flow.
2025-05-15 17:14:41 +02:00
Benoit Marty
98cfddce3f Check homeserver when login using qr code (#4708)
* Login with Qr code: check homeserver validity

* QrCode login, unauthorized homeserver: update copy.

* Update screenshots

* Add unit test on SdkQrCodeLoginData

* Remove default param value.

* Remember imageAnalysis

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-15 14:08:05 +02:00