Commit Graph

4375 Commits

Author SHA1 Message Date
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
Jorge Martin Espinosa
c02c1ae1bd fix: Make Client.findDM return a Result (#4816) 2025-06-04 08:41:26 +00:00
Jorge Martin Espinosa
0aa1a258e4 fix: When sending media as files use the application/octet-stream mime type (#4815)
This ensures there is no media pre-processing applied, but also has the side effect of not sending a thumbnail as we (incorrectly) did until now.
2025-06-04 10:30:50 +02:00
Benoit Marty
cb9c6776e1 Fix login flow (#4813)
* Also clear the data, to let the next screen be able to go back

* Disable the change account provider button when the form is loading the data to prevent double navigation

* Improve OnboardingViewTest, ensure that no Event are emitted.

* OnboardingViewTest: add tests to cover the change.
2025-06-04 08:02:58 +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
68fc45d743 change (room member moderation) : add unban action test 2025-06-03 12:04:37 +02:00
ganfra
b1b92dd75c change (room member moderation) : fix copyright 2025-06-03 10:58:25 +02:00
ganfra
cfbbccb09d Merge branch 'develop' into feature/fga/user_moderation_bottomsheet 2025-06-03 10:46:12 +02:00
Benoit Marty
37344a4f7d Fix mobile link (#4805)
* Fix path of mobile link. Adding a trailing `/`

* Reduce brain pressure.
2025-06-02 16:11:30 +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
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
Jorge Martin Espinosa
c67089edf7 Add ActiveRoomsHolder to manage the active rooms for a session (#4758) 2025-05-26 11:03:55 +00:00
ganfra
3d5274a6d4 change (member moderation) : clean up 2025-05-24 11:23:09 +02:00
ganfra
a6ec5469ef change (member moderation) : add test on RoomMemberModerationView 2025-05-24 11:16:33 +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
2ac333bb52 change (member moderation) : clean and add tests on Presenter 2025-05-21 18:31:08 +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
Benoit Marty
1a6596a89a Fix compilation issues. (#4750)
* Fix compilation issues.

* Fix compilation issues.
2025-05-20 13:12:01 +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
Benoit Marty
c6f6c2cd65 Allow configuration to provide multiple account providers. (#4742)
* Allow several account provider in configuration

* Target latest private modules.

* Fix tests

* Target latest private modules.

* Trigger CI

* Fix formatting issue
2025-05-20 08:57:01 +02:00
Benoit Marty
6995e62548 Merge on boarding module to login module (#4746)
* Move onboarding code to the login module.

* Remove OnBoardingEntryPoint, move the flow to LoginFlowNode

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-20 08:54:23 +02:00
ganfra
2429879b5a change (member moderation) : fix all existing tests 2025-05-19 22:16:17 +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
ganfra
c6eea91d69 change (member moderation) : allow disabled action and render unban too 2025-05-16 18:38:15 +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
Jorge Martin Espinosa
44d77a6048 Remove event cache feature flag (#4719) 2025-05-15 09:42:18 +02:00
ganfra
1599e038d4 Merge pull request #4718 from element-hq/feature/fga/report_room_enabled_flow
Change (report room) : check if server supports the report room api
2025-05-14 17:25:17 +02:00
ganfra
f22b921768 change (member moderation) : branch moderation on timeline 2025-05-14 11:19:07 +02:00
ganfra
5272587897 change (member moderation) : extract in a separate module 2025-05-14 11:19:07 +02:00
ganfra
405cd8e82d change (report room) : use client.isReportRoomApiSupported instead of hardcoded value 2025-05-14 11:07:17 +02:00
Jorge Martin Espinosa
141099ffb2 Fix generic mime type being uploaded when several files are externally shared with the app. (#4715)
i.e. `image/*` when sharing a png and jpg file.
2025-05-13 15:26:47 +00:00
Benoit Marty
b322a4bae5 Disable mutliple click (parallel or serial) on a room (#4683)
* Disable mutliple click (parallel or serial) on a room (Fixes #4619)

* Rename method from FirstThrottler

* Move check to the Compose and add unit test on it.
2025-05-13 14:12:19 +02:00
Benoit Marty
93499910ba Improve audio focus management (#4707)
* Extract Audio focus management to its own modules.

* Request Audio focus when playing a voice message.

* Add missing dependency.
(and remove a duplicated one)

* Request Audio focus when playing a video/audio in the media viewer.

* Pause audio when audio focus is lost.

* Rename class

* Fix tests

* Fix detekt issue.

* Audio focus: let the system handle automatic ducking when playing media.

* Document and update API

* Remove useless space.
2025-05-13 09:54:58 +00:00
Benoit Marty
857adf27b6 Disable Continue button when the login field is cleared. (#4699)
* Disable Continue button when the login field is cleared.
Fixes #4691

* Add tests on LoginPasswordView
2025-05-12 14:45:07 +02:00
ElementBot
bcfbd5ace4 Sync Strings from Localazy (#4703)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-05-12 09:56:19 +02:00
Benoit Marty
e8e75af506 Update "Learn more" link (#4686)
* Update target link for "Learn more".

* Rename VerifySelfSession* to OutgoingVerification*

* Optimize import

* Refactor to avoid long line

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-09 11:10:30 +02:00
Benoit Marty
0e74fe7062 Ensure that the Rust room is not closed while the driver needs it. (#4694) 2025-05-08 09:33:35 +02:00
renovate[bot]
62a1d1bcb9 fix(deps): update android.gradle.plugin to v8.10.0 (#4687)
* fix(deps): update android.gradle.plugin to v8.10.0

* Update lint version to 8.11.0-alpha09

* Fix lint false positive.

Error: Modifier factory functions must use the receiver Modifier instance [ModifierFactoryUnreferencedReceiver from androidx.compose.ui]

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-07 11:07:20 +02:00
Benoit Marty
93eb70bd83 Let EnterpriseService prevent usage of homeserver (#4682)
* Add check on homeserver url.

* Update screenshots

* Add missing test

* Update submodule link.

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-06 17:25:07 +00:00
Benoit Marty
32916444e5 Fix read receipt behavior when the timeline is opened. (#4679)
* Use Timber instead of println

* Fix ReadReceipt not sent when new event is received:
- filter Virtual item regarding typing to compute NewEventState
- always scroll, since the latest event is always the typing notification (but with 0 height). This triggers the sending of RR.

* Improve the fix to fix regression detected by unit tests.

* Remove unnecessary parenthesis

* Document parameter.
2025-05-06 12:41:34 +00:00